[pypy-svn] r12983 - pypy/dist/pypy/translator

pedronis at codespeak.net pedronis at codespeak.net
Wed Jun 1 17:37:57 CEST 2005


Author: pedronis
Date: Wed Jun  1 17:37:56 2005
New Revision: 12983

Modified:
   pypy/dist/pypy/translator/annrpython.py
Log:
set bindings for last_exc* extra vars only if they are indeed vars.



Modified: pypy/dist/pypy/translator/annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/annrpython.py	(original)
+++ pypy/dist/pypy/translator/annrpython.py	Wed Jun  1 17:37:56 2005
@@ -443,8 +443,10 @@
                     last_exception_object.const = last_exception_var.value
                 last_exception_object.is_type_of = [last_exc_value_var]
 
-                self.setbinding(last_exception_var, last_exception_object)
-                self.setbinding(last_exc_value_var, last_exc_value_object)
+                if isinstance(last_exception_var, Variable):
+                    self.setbinding(last_exception_var, last_exception_object)
+                if isinstance(last_exc_value_var, Variable):
+                    self.setbinding(last_exc_value_var, last_exc_value_object)
 
                 last_exception_object = annmodel.SomeObject()
                 last_exception_object.knowntype = type



More information about the Pypy-commit mailing list