DebugClients/Python3/DebugBase.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
--- a/DebugClients/Python3/DebugBase.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/DebugClients/Python3/DebugBase.py	Sat Jan 02 15:11:35 2010 +0000
@@ -577,12 +577,15 @@
         exctype, excval, exctb = excinfo
         if exctype in [SystemExit, bdb.BdbQuit]:
             atexit._run_exitfuncs()
-            self._dbgClient.progTerminated(excval)
+            if isinstance(excval, int):
+                self._dbgClient.progTerminated(excval)
+            else:
+                self._dbgClient.progTerminated(excval.code)
             return
         
         elif exctype in [SyntaxError, IndentationError]:
             try:
-                message, (filename, linenr, charnr, text) = excval.args
+                message, (filename, linenr, charnr, text) = excval[0], excval[1]
             except ValueError:
                 exclist = []
             else:
@@ -601,9 +604,7 @@
             else:
                 exctypetxt = str(exctype)
             try:
-                exclist = [exctypetxt, 
-                           str(excval).encode(
-                                self._dbgClient.getCoding(), 'backslashreplace')]
+                exclist = [exctypetxt, str(excval)]
             except TypeError:
                 exclist = [exctypetxt, str(excval)]
             

eric ide

mercurial