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

pedronis at codespeak.net pedronis at codespeak.net
Tue Sep 27 00:29:27 CEST 2005


Author: pedronis
Date: Tue Sep 27 00:29:26 2005
New Revision: 17888

Modified:
   pypy/dist/pypy/translator/annrpython.py
Log:
just on log event



Modified: pypy/dist/pypy/translator/annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/annrpython.py	(original)
+++ pypy/dist/pypy/translator/annrpython.py	Tue Sep 27 00:29:26 2005
@@ -181,13 +181,15 @@
                         fn = self.why_not_annotated[block][1].break_at[0]
                         self.blocked_functions[fn] = True
                         import traceback
-                        log.ERROR('-+' * 30)
-                        log.ERROR('BLOCKED block at :' +
-                                  self.whereami(self.why_not_annotated[block][1].break_at))
-                        log.ERROR('because of:')
-                        for line in traceback.format_exception(*self.why_not_annotated[block]):
-                            log.ERROR(line)
-                        log.ERROR('-+' * 30)
+                        blocked_err = []
+                        blocked_err.append('-+' * 30 +'\n')
+                        blocked_err.append('BLOCKED block at :' +
+                                           self.whereami(self.why_not_annotated[block][1].break_at) +
+                                           '\n')
+                        blocked_err.append('because of:\n')
+                        blocked_err.extend(traceback.format_exception(*self.why_not_annotated[block]))
+                        blocked_err.append('-+' * 30 +'\n')
+                        log.ERROR(''.join(blocked_err))
 
             raise AnnotatorError('%d blocks are still blocked' %
                                  self.annotated.values().count(False))



More information about the Pypy-commit mailing list