[Python-checkins] cpython (2.7): Issue #23811: Add missing newline to the PyCompileError error message.

berker.peksag python-checkins at python.org
Tue Apr 14 18:02:22 CEST 2015


https://hg.python.org/cpython/rev/22790c4f3b16
changeset:   95644:22790c4f3b16
branch:      2.7
parent:      95636:31c8b57f1197
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Tue Apr 14 19:03:06 2015 +0300
summary:
  Issue #23811: Add missing newline to the PyCompileError error message.

Patch by Alex Shkop.

files:
  Lib/py_compile.py |  2 +-
  Misc/NEWS         |  3 +++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/py_compile.py b/Lib/py_compile.py
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -163,7 +163,7 @@
             except PyCompileError as error:
                 # return value to indicate at least one failure
                 rv = 1
-                sys.stderr.write(error.msg)
+                sys.stderr.write("%s\n" % error.msg)
     return rv
 
 if __name__ == "__main__":
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,9 @@
 Library
 -------
 
+- Issue #23811: Add missing newline to the PyCompileError error message.
+  Patch by Alex Shkop.
+
 - Issue #17898: Fix exception in gettext.py when parsing certain plural forms.
 
 - Issue #23865: close() methods in multiple modules now are idempotent and more

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list