Commit fb067468 authored by Florent Xicluna's avatar Florent Xicluna

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

parent 49ab14f4
...@@ -1674,12 +1674,11 @@ class XMLParser: ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment