I have a class in python which creates an ssh connection to a remote machine.
In a function of the class, I have put the code in try/except block.
try:
----------
----------
except AssertionError:
print "Error Condition"
In this code, when error occurs, it raises the AssertionError but the destuctor isnt called itself.
As a result the ssh conenctions are not closed.
Whenever such errors occurs should I call a function closing the ssh connection?
What is the general way a python script exits on encountering an error?
Thanks
Akanksha
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor