From aa90e7c573ee2edd41a21d2a9f34e6f3d728f5e5 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 3 Jul 2011 17:39:20 -0700 Subject: Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. --- Lib/idlelib/PyShell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 06c8bba..834805e 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -59,7 +59,7 @@ else: file = warning_stream try: file.write(warnings.formatwarning(message, category, filename, - lineno, file=file, line=line)) + lineno, line=line)) except IOError: pass ## file (probably __stderr__) is invalid, warning dropped. warnings.showwarning = idle_showwarning -- cgit v0.12 ();'> https://github.com/python/cpython.git
summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-18 01:20:21 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-18 01:20:21 (GMT)
commit12b6457e24924ff60cf89fd19a584185a5d6c256 (patch)
tree6ed970bea82d50c12b89edbbf9be39507588cf20 /Lib
parent3090694068670371cdbd5b1a3d3c5dbecc83835a (diff)
downloadcpython-12b6457e24924ff60cf89fd19a584185a5d6c256.zip
cpython-12b6457e24924ff60cf89fd19a584185a5d6c256.tar.gz
cpython-12b6457e24924ff60cf89fd19a584185a5d6c256.tar.bz2
Fix compileall.py so that it fails on SyntaxErrors
The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/compileall.py34
1 files changed, 26 insertions, 8 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py