[llvm] r187919 - [lit] Avoid comparisons with None.
Daniel Dunbar
daniel at zuster.org
Wed Aug 7 14:43:23 PDT 2013
Author: ddunbar
Date: Wed Aug 7 16:43:23 2013
New Revision: 187919
URL: http://llvm.org/viewvc/llvm-project?rev=187919&view=rev
Log:
[lit] Avoid comparisons with None.
Modified:
llvm/trunk/utils/lit/lit/TestRunner.py
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=187919&r1=187918&r2=187919&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Wed Aug 7 16:43:23 2013
@@ -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)
More information about the llvm-commits
mailing list