mirror of https://github.com/python/cpython
Flatten nested try ... finally, try ... except.
This commit is contained in:
parent
49ab14f452
commit
fb06746852
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue