Commit a8023e5e authored by Stefan Behnel's avatar Stefan Behnel

fix return value setting for 'except *' functions

parent 69fb3b5f
...@@ -956,6 +956,8 @@ class FuncDefNode(StatNode, BlockNode): ...@@ -956,6 +956,8 @@ class FuncDefNode(StatNode, BlockNode):
exc_check = self.caller_will_check_exceptions() exc_check = self.caller_will_check_exceptions()
if err_val is not None or exc_check: if err_val is not None or exc_check:
code.putln('__Pyx_AddTraceback("%s");' % self.entry.qualified_name) code.putln('__Pyx_AddTraceback("%s");' % self.entry.qualified_name)
if err_val is None and self.return_type.default_value:
err_val = self.return_type.default_value
if err_val is not None: if err_val is not None:
code.putln( code.putln(
"%s = %s;" % ( "%s = %s;" % (
......
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