diff options
author | Guilherme Polo <ggpolo@gmail.com> | 2009-08-14 15:05:30 +0000 |
---|---|---|
committer | Guilherme Polo <ggpolo@gmail.com> | 2009-08-14 15:05:30 +0000 |
commit | 1fff00832639082d2d7aa354c8e6d9110171d6bc (patch) | |
tree | 969c400d839ce118c879c0537cd93065c24fe518 /Lib/idlelib/run.py | |
parent | 6837083582176067868d1cc60772ef9de6ef6bd3 (diff) | |
download | cpython-git-1fff00832639082d2d7aa354c8e6d9110171d6bc.tar.gz |
Merged revisions 74446-74449 via svnmerge from
svn+ssh://pythondev/python/trunk
........
r74446 | guilherme.polo | 2009-08-14 10:53:41 -0300 (Fri, 14 Aug 2009) | 1 line
Issue #3344: Replace itertools.count by enumerate.
........
r74447 | guilherme.polo | 2009-08-14 11:03:07 -0300 (Fri, 14 Aug 2009) | 1 line
Issue #3926: Fix the usage of the new showwarnings and formatwarning.
........
r74448 | guilherme.polo | 2009-08-14 11:36:45 -0300 (Fri, 14 Aug 2009) | 3 lines
Issue #1135: Add the XView and YView mix-ins to avoid duplicating
the xview* and yview* methods.
........
r74449 | guilherme.polo | 2009-08-14 11:43:43 -0300 (Fri, 14 Aug 2009) | 1 line
Clarifying Entry.selection_present's docstring.
........
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r-- | Lib/idlelib/run.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index fd2cc09042..25338ffaa6 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -25,12 +25,13 @@ except ImportError: pass else: def idle_formatwarning_subproc(message, category, filename, lineno, - file=None, line=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() \ - if line is None else line + if line is None: + line = linecache.getline(filename, lineno) + line = line.strip() if line: s += " %s\n" % line s += "%s: %s\n" % (category.__name__, message) |