This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: py_compile does not return error code
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jvr, mferris1, nnorwitz
Priority: normal Keywords:

Created on 2002-12-13 15:27 by mferris1, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (5)
msg13604 - (view) Author: Mark Ferris (mferris1) Date: 2002-12-13 15:27
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
msg13605 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-01-03 12:23
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.
msg13606 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-20 18:26
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
msg13607 - (view) Author: Mark Ferris (mferris1) Date: 2003-01-20 21:09
Logged In: YES 
user_id=668563

As long as you include compileall.py 1.13+ version with the 
py_compile.py 1.24 change that was made, then it looks like the 
change made will satisfy my needs.  Thanks!
msg13608 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-20 21:12
Logged In: YES 
user_id=33168

Ok, I'm closing this as Fixed, then.  Thanks.
History
Date User Action Args
2022-04-10 16:06:02adminsetgithub: 37610
2002-12-13 15:27:34mferris1create