[lit] Avoid comparisons with None.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2013-08-07 21:43:23 +00:00
parent a1ba7527de
commit bd9bb2c515

View File

@ -224,7 +224,9 @@ def executeShCmd(cmd, cfg, cwd, results):
results.append((cmd.commands[i], out, err, res))
if cmd.pipe_err:
# Python treats the exit code as a signed char.
if res < 0:
if exitCode is None:
exitCode = res
elif res < 0:
exitCode = min(exitCode, res)
else:
exitCode = max(exitCode, res)