[Patches] [ python-Patches-1171150 ] Newline in error output of py_compile.compile

SourceForge.net noreply at sourceforge.net
Fri Jun 10 19:15:48 CEST 2005


Patches item #1171150, was opened at 2005-03-26 21:57
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1171150&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: paul cannon (paulcannon)
>Assigned to: Reinhold Birkenfeld (birkenfeld)
Summary: Newline in error output of py_compile.compile

Initial Comment:
The py_compile.compile() function, when doraise=False
and a compilation error is encountered, simply prints
the message to sys.stderr and returns.  However, it
neglects to add a newline.  Furthermore, judging by the
definition of PyCompileError earlier in the file and
the fact that the message will always come from an
instance of PyCompileError, the message will never
include a newline.

Some shells issue a carraige return before the command
prompt, so that would hide the output from
py_compile.compile if it were the last message to the
console.

Checking all occurences of "py_compile" in the python
source indicates they all either use compile() with
doraise=True or expect normal newline-terminated output
on error.

This patch appends the newline.

----------------------------------------------------------------------

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-10 19:15

Message:
Logged In: YES 
user_id=1188172

Thanks! Checked in as py_compile.py rev 1.27.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1171150&group_id=5470


More information about the Patches mailing list