can somebody help me with the following piece of the code:
try:
#do some things
myClass.close()
except Exception, error:
myClass.close()
raise error
as You see I can't use here finally because in that case I will not know if an error actually occured, and I need to raise this error (raise error)
my question is how can I avoid using this two times myClass.close()? thanks in advance for any help