[pypy-svn] r25811 - pypy/dist/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Thu Apr 13 19:07:32 CEST 2006


Author: arigo
Date: Thu Apr 13 19:07:31 2006
New Revision: 25811

Modified:
   pypy/dist/pypy/annotation/bookkeeper.py
Log:
/me got tired of having to run --pdb to figure out what this
unexpected 'pyobj' prebuilt constant could be.


Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py	(original)
+++ pypy/dist/pypy/annotation/bookkeeper.py	Thu Apr 13 19:07:31 2006
@@ -456,7 +456,11 @@
                         name)
             else:
                 # must be a frozen pre-built constant, but let's check
-                assert pyobj._freeze_()
+                try:
+                    assert pyobj._freeze_()
+                except AttributeError:
+                    raise Exception("unexpected prebuilt constant: %r" % (
+                        pyobj,))
                 result = self.getfrozen(pyobj)
             self.descs[pyobj] = result
             return result



More information about the Pypy-commit mailing list