Flatten nested try ... finally, try ... except.

This commit is contained in:
Florent Xicluna 2012-03-05 11:42:49 +01:00
parent 49ab14f452
commit fb06746852
1 changed files with 5 additions and 6 deletions

View File

@ -1674,12 +1674,11 @@ class XMLParser:
except self._error as v: except self._error as v:
self._raiseerror(v) self._raiseerror(v)
try: try:
try: close_handler = self.target.close
close_handler = self.target.close except AttributeError:
except AttributeError: pass
pass else:
else: return close_handler()
return close_handler()
finally: finally:
# get rid of circular references # get rid of circular references
del self.parser, self._parser del self.parser, self._parser