[pypy-svn] r46686 - pypy/dist/pypy/tool

arigo at codespeak.net arigo at codespeak.net
Sun Sep 16 21:27:11 CEST 2007


Author: arigo
Date: Sun Sep 16 21:27:10 2007
New Revision: 46686

Modified:
   pypy/dist/pypy/tool/error.py
Log:
More of the same.


Modified: pypy/dist/pypy/tool/error.py
==============================================================================
--- pypy/dist/pypy/tool/error.py	(original)
+++ pypy/dist/pypy/tool/error.py	Sun Sep 16 21:27:10 2007
@@ -123,9 +123,13 @@
             r = "function %s <%s, line %s>" % (func.func_name,
                    func.func_code.co_filename, func.func_code.co_firstlineno)
         msg.append("  %s returning" % (r,))
-        graph = desc.getuniquegraph()
-        msg.append("      %s" % annotator.binding(
-            graph.returnblock.inputargs[0], "(no annotation)"))
+        if hasattr(desc, 'getuniquegraph'):
+            graph = desc.getuniquegraph()
+            r = annotator.binding(graph.returnblock.inputargs[0],
+                                  "(no annotation)")
+        else:
+            r = '?'
+        msg.append("      %s" % (r,))
         msg.append("")
 
 def format_someobject_error(annotator, position_key, what, s_value, called_from_graph, binding=""):



More information about the Pypy-commit mailing list