Commit f0d37d22 authored by Robert Bradshaw's avatar Robert Bradshaw

Exception corner case.

parent db0f479d
......@@ -4497,7 +4497,8 @@ class ExceptClauseNode(Node):
else:
code.putln("/*except:*/ {")
if not getattr(self.body, 'stats', True):
if not getattr(self.body, 'stats', True) and
self.excinfo_target is None and self.target is None):
# most simple case: no exception variable, empty body (pass)
# => reset the exception state, done
code.putln("PyErr_Restore(0,0,0);")
......
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