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

Unified Diff: appengine/third_party_local/depot_tools/auto_stub.py

Issue 2117833003: endpoints -> webapp2 adapter (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: decode bool field Created 4 years, 5 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
Index: appengine/third_party_local/depot_tools/auto_stub.py
diff --git a/appengine/third_party_local/depot_tools/auto_stub.py b/appengine/third_party_local/depot_tools/auto_stub.py
index c5a3495c6fc7e6335fb24cd139f9359c56a7e78c..64f20192755b3e0b5f17e3d322cfd9ab50d414b0 100644
--- a/appengine/third_party_local/depot_tools/auto_stub.py
+++ b/appengine/third_party_local/depot_tools/auto_stub.py
@@ -7,6 +7,7 @@ __version__ = '1.0'
import collections
import inspect
import unittest
+import sys
class AutoStubMixIn(object):
@@ -70,4 +71,7 @@ class TestCase(unittest.TestCase, AutoStubMixIn):
def has_failed(self):
"""Returns True if the test has failed."""
- return not self._resultForDoCleanups.wasSuccessful()
+ if self._resultForDoCleanups:
+ return not self._resultForDoCleanups.wasSuccessful()
+ ex, _, _, = sys.exc_info()
+ return bool(ex)

Powered by Google App Engine
This is Rietveld 408576698