llvm.org GIT mirror llvm / bd2499a
Expand uses of python 2.6's "A if B else C" syntax into regular if-else statements, to hopefully support older pythons (PR7850). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110638 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
1 changed file(s) with 16 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
519519 out,err,exitCode = res
520520 if isXFail:
521521 ok = exitCode != 0 or err
522 status = Test.XFAIL if ok else Test.XPASS
522 if ok:
523 status = Test.XFAIL
524 else:
525 status = Test.XPASS
523526 else:
524527 ok = exitCode == 0 and not err
525 status = Test.PASS if ok else Test.FAIL
528 if ok:
529 status = Test.PASS
530 else:
531 status = Test.FAIL
526532
527533 if ok:
528534 return (status,'')
559565 out,err,exitCode = res
560566 if isXFail:
561567 ok = exitCode != 0
562 status = Test.XFAIL if ok else Test.XPASS
568 if ok:
569 status = Test.XFAIL
570 else:
571 status = Test.XPASS
563572 else:
564573 ok = exitCode == 0
565 status = Test.PASS if ok else Test.FAIL
574 if ok:
575 status = Test.PASS
576 else:
577 status = Test.FAIL
566578
567579 if ok:
568580 return (status,'')