Author: Ronan Lamy <[email protected]>
Branch: less-stringly-ops
Changeset: r67059:c5e357896529
Date: 2013-09-22 07:28 +0100
http://bitbucket.org/pypy/pypy/changeset/c5e357896529/
Log: Allow passing empty exceptions to guessexception()
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -434,14 +434,15 @@
def do_op(self, op):
self.record(op)
- if op.canraise:
- self.guessexception(op.canraise)
+ self.guessexception(op.canraise)
return op.result
def guessexception(self, exceptions, force=False):
"""
Catch possible exceptions implicitly.
"""
+ if not exceptions:
+ return
if not force and not any(isinstance(block, (ExceptBlock, FinallyBlock))
for block in self.blockstack):
# The implicit exception wouldn't be caught and would later get
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit