Another 2.6 return_stmt bug

This commit is contained in:
rocky
2016-07-01 07:33:51 -04:00
parent fa6ae76a64
commit 71822bf9b3
3 changed files with 18 additions and 3 deletions

View File

@@ -8,3 +8,15 @@ def initiate_send(self):
else:
del self.producer_fifo[0]
return
# 2.6.9 contextlib.py
# Bug was in return exc, so added:
# return_stmt ::= ret_expr RETURN_VALUE_IF come_from_pop
def __exit__(self, type, value, traceback):
try:
raise RuntimeError
except StopIteration:
return exc
except:
raise