[Python-bugs-list] [ python-Bugs-653301 ] py_compile does not return error code

SourceForge.net noreply@sourceforge.net
Mon, 20 Jan 2003 10:26:45 -0800


Bugs item #653301, was opened at 2002-12-13 10:27
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=653301&group_id=5470

Category: Build
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Ferris (mferris1)
Assigned to: Nobody/Anonymous (nobody)
Summary: py_compile does not return error code

Initial Comment:
Since py_compile.compile() does not return an error code, the 
compile_all module does not return an error code and my ant build 
process continues merrily along even though it should 
failOnError.

This appears to be related to an incomplete fix 
for bug 412436.  The download attached to that defect included 
changes to py_compile.py and compileall.py.  It looks like the 
py_compile.py changes were not implemented.

A simple 
fix that has been working for me is to change 
the
py_compile.py file as follows.  This diff was done against 
version 1.18 of py_compile.py:
69c69
<         return 0
---
>         
return
83d82
<       return 1

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-20 13:26

Message:
Logged In: YES 
user_id=33168

An exception is now raised to indicate an error.  The
doraise flag must be set when calling py_compile.compile().
 Does this satisfy your needs?  Can we close this bug report?

The change was Lib/py_compile.py 1.24

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

Comment By: Just van Rossum (jvr)
Date: 2003-01-03 07:23

Message:
Logged In: YES 
user_id=92689

It indeed seems the fix for bug #412436 was not checked in
completely. I'll add a note there.

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

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