[pypy-svn] r64839 - pypy/branch/pyjitpl5/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Wed Apr 29 20:39:19 CEST 2009


Author: antocuni
Date: Wed Apr 29 20:39:07 2009
New Revision: 64839

Modified:
   pypy/branch/pyjitpl5/pypy/translator/cli/class_.py
Log:
argh, really check for *all* subclasses of Exception


Modified: pypy/branch/pyjitpl5/pypy/translator/cli/class_.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/translator/cli/class_.py	(original)
+++ pypy/branch/pyjitpl5/pypy/translator/cli/class_.py	Wed Apr 29 20:39:07 2009
@@ -149,7 +149,7 @@
         self.ilasm.end_function()
 
     def _toString(self):
-        if self.get_base_class() == '[mscorlib]System.Exception':
+        if ootype.isSubclass(self.INSTANCE, self.db.genoo.EXCEPTION):
             return # don't override the default ToString, which prints a traceback
         self.ilasm.begin_function('ToString', [], 'string', False, 'virtual', 'instance', 'default')
         self.ilasm.opcode('ldarg.0')



More information about the Pypy-commit mailing list