Author: kurt.kaiser
Date: Sun Jul 22 07:48:45 2007
New Revision: 56487
Modified:
python/branches/p3yk/Lib/idlelib/ScriptBinding.py
Log:
Exception attr accessed via args in py3k.
Modified: python/branches/p3yk/Lib/idlelib/ScriptBinding.py
==============================================================================
--- python/branches/p3yk/Lib/idlelib/ScriptBinding.py (original)
+++ python/branches/p3yk/Lib/idlelib/ScriptBinding.py Sun Jul 22 07:48:45 2007
@@ -99,13 +99,13 @@
return compile(source, filename, "exec")
except (SyntaxError, OverflowError) as err:
try:
- msg, (errorfilename, lineno, offset, line) = err
+ msg, (errorfilename, lineno, offset, line) = err.args
if not errorfilename:
err.args = msg, (filename, lineno, offset, line)
err.filename = filename
self.colorize_syntax_error(msg, lineno, offset)
except:
- msg = "*** " + str(err)
+ msg = str(err)
self.errorbox("Syntax error",
"There's an error in your program:\n" + msg)
return False
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins