diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-16 19:46:25 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-16 19:46:25 (GMT) |
commit | 352ebae87efdd8dead814dfc7b153dabb26317d8 (patch) | |
tree | 21c59a1bcebd7de6ad1dd042b69f6d3cb095b0bf /Lib/idlelib/run.py | |
parent | d586c4ed2ba5c1d98d29a2dc37af1077d876b9d2 (diff) | |
download | cpython-352ebae87efdd8dead814dfc7b153dabb26317d8.zip cpython-352ebae87efdd8dead814dfc7b153dabb26317d8.tar.gz cpython-352ebae87efdd8dead814dfc7b153dabb26317d8.tar.bz2 |
Merged revisions 66922 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66922 | benjamin.peterson | 2008-10-16 14:40:14 -0500 (Thu, 16 Oct 2008) | 1 line
use new showwarnings signature for idle #3391
........
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r-- | Lib/idlelib/run.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 7827c74..abe94ab 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -24,11 +24,13 @@ try: except ImportError: pass else: - def idle_formatwarning_subproc(message, category, filename, lineno): + def idle_formatwarning_subproc(message, category, filename, lineno, + file=None, line=None): """Format warnings the IDLE way""" s = "\nWarning (from warnings module):\n" s += ' File \"%s\", line %s\n' % (filename, lineno) - line = linecache.getline(filename, lineno).strip() + line = linecache.getline(filename, lineno).strip() \ + if line is None else line if line: s += " %s\n" % line s += "%s: %s\n" % (category.__name__, message) |