summaryrefslogtreecommitdiffstats
path: root/Lib/py_compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/py_compile.py')
-rw-r--r--Lib/py_compile.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index 982d19d..8ef3662 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -171,11 +171,15 @@ def main(args=None):
"""
if args is None:
args = sys.argv[1:]
+ rv = 0
for filename in args:
try:
compile(filename, doraise=True)
except PyCompileError as err:
+ # return value to indicate at least one failure
+ rv = 1
sys.stderr.write(err.msg)
+ return rv
if __name__ == "__main__":
- main()
+ sys.exit(main())