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.

Title: py_compile.main() does not return error code
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6, Python 2.5
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: catlee, georg.brandl, ozzeng
Priority: normal Keywords: easy, patch

Created on 2008-03-03 19:15 by catlee, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
py_compile.patch ozzeng, 2008-03-06 01:56
Messages (3)
msg63226 - (view) Author: Chris AtLee (catlee) * Date: 2008-03-03 19:15
When using the py_compile module from the command line, and a
SyntaxError is encountered, python still exits with a 0 return code. 
This usually indicates that the process completely successfully.

Could py_compile.main() be modified to return a non-zero return code if
an exception was raised?
msg63302 - (view) Author: Ozkan Zengin (ozzeng) Date: 2008-03-06 01:56
This patch was generated against the trunk but is unchanged from the version in
the release 2.5-maint branch.
msg63310 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-03-06 07:41
Committed patch and new docs in r61273. Thanks!
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46478
2008-03-06 07:41:39georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg63310
nosy: + georg.brandl
2008-03-06 01:56:41ozzengsetfiles: + py_compile.patch
nosy: + ozzeng
messages: + msg63302
keywords: + patch
versions: + Python 2.6
2008-03-04 17:26:01akuchlingsetkeywords: + easy
2008-03-03 19:15:05catleecreate