[pypy-svn] r36303 - pypy/branch/jit-codegen-refactor/pypy/translator/tool

arigo at codespeak.net arigo at codespeak.net
Mon Jan 8 18:25:26 CET 2007


Author: arigo
Date: Mon Jan  8 18:25:23 2007
New Revision: 36303

Modified:
   pypy/branch/jit-codegen-refactor/pypy/translator/tool/reftracker.py
Log:
Make reftracker robust against missing attributes.


Modified: pypy/branch/jit-codegen-refactor/pypy/translator/tool/reftracker.py
==============================================================================
--- pypy/branch/jit-codegen-refactor/pypy/translator/tool/reftracker.py	(original)
+++ pypy/branch/jit-codegen-refactor/pypy/translator/tool/reftracker.py	Mon Jan  8 18:25:23 2007
@@ -117,8 +117,13 @@
                 for key, value in basetype.__dict__.items():
                     if (type(value) is MemberDescriptorType or
                         type(value) is AttributeType):
-                        if value.__get__(o1) is o2:
-                            slst.append(str(key))
+                        try:
+                            o1value = value.__get__(o1)
+                        except:
+                            pass
+                        else:
+                            if o1value is o2:
+                                slst.append(str(key))
         return ', '.join(slst)
 
 



More information about the Pypy-commit mailing list