Bug 938428 - Always return an int from the cl.py main function, so that sys.exit crazyness doesn't bite. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 16 Nov 2013 13:39:08 +0900
changeset 170486 11a0a8ed61aaee01a7cc73f4220b6d021adf1ae1
parent 170485 f1a38c3857d078e730f139f6b47615691ee1daad
child 170487 10fecade0b53c3411be67766a4b6c1bbf6535bfe
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs938428
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 938428 - Always return an int from the cl.py main function, so that sys.exit crazyness doesn't bite. r=gps
python/mozbuild/mozbuild/action/cl.py
--- a/python/mozbuild/mozbuild/action/cl.py
+++ b/python/mozbuild/mozbuild/action/cl.py
@@ -91,17 +91,19 @@ def InvokeClWithDependencyGeneration(cmd
     # we can run into weird compilation issues.
     p = ProcessHandlerMixin(cmdline, processOutputLine=[on_line],
         ignore_children=True)
     p.run()
     p.processOutput()
     ret = p.wait()
 
     if ret != 0 or target == "":
-        return ret
+        # p.wait() returns a long. Somehow sys.exit(long(0)) is like
+        # sys.exit(1). Don't ask why.
+        return int(ret)
 
     depsdir = os.path.normpath(os.path.join(os.curdir, ".deps"))
     depstarget = os.path.join(depsdir, depstarget)
     if not os.path.isdir(depsdir):
         try:
             os.makedirs(depsdir)
         except OSError:
             pass # This suppresses the error we get when the dir exists, at the