Oh, another thing that occurred to me: &#95;&#95;del&#95;&#95;() could also be running inside or after another exception handler ran.  In other words, a different exception could have been thrown, then your &#95;&#95;del&#95;&#95;() might run just before sys.exit() happens but sometimes it will not.  That could result in recovery not happening randomly (if python decides not to call garbage collection before exit).  Another reason to keep &#95;&#95;del&#95;&#95;() very simple.