creepy design in python
<p>can somebody help me with the following piece of the code:</p>

<pre><code>try:
    #do some things
    myClass.close()
except Exception, error:
    myClass.close()
    raise error
</code></pre>

<p>as You see I can't use here <code>finally</code> because in that case I will not know if an error actually occured, and I need to raise this error (raise error)</p>

<p>my question is how can I avoid using this two times <code>myClass.close()?</code> thanks in advance for any help</p>
