Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2184)

Unified Diff: test/lib/TestCommon.py

Issue 10399072: Allow multiple possibe error codes for the "status" parameter. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mac/gyptest-objc-gc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/lib/TestCommon.py
===================================================================
--- test/lib/TestCommon.py (revision 1384)
+++ test/lib/TestCommon.py (working copy)
@@ -189,19 +189,16 @@
missing.append(f)
return existing, missing
-if os.name == 'posix':
Nico 2012/05/17 20:31:57 The two branches looked identical to me, so I got
- def _failed(self, status = 0):
- if self.status is None or status is None:
- return None
- return _status(self) != status
- def _status(self):
- return self.status
-elif os.name == 'nt':
- def _failed(self, status = 0):
- return not (self.status is None or status is None) and \
- self.status != status
- def _status(self):
- return self.status
+def _failed(self, status = 0):
+ if self.status is None or status is None:
+ return None
+ try:
+ return _status(self) not in status
Mark Mentovai 2012/05/17 21:08:58 OK to the reorganization, but could you be consist
Nico 2012/05/17 21:29:36 Done. Huh, looks like this file doesn't use google
+ except TypeError:
+ # status wasn't an iterable
+ return _status(self) != status
+def _status(self):
+ return self.status
class TestCommon(TestCmd):
« no previous file with comments | « no previous file | test/mac/gyptest-objc-gc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698