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

Unified Diff: testing_support/coverage_utils.py

Issue 198723010: Fix error messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: s/hasattr/getattr/ Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/coverage_utils.py
diff --git a/testing_support/coverage_utils.py b/testing_support/coverage_utils.py
index 15cbffa81bd42fc951ae692d1ba5cd6b9d07a40c..f049938b98803bf43d4b39d626fa641a3d44eb49 100644
--- a/testing_support/coverage_utils.py
+++ b/testing_support/coverage_utils.py
@@ -16,7 +16,8 @@ def native_error(msg, version):
print textwrap.dedent("""\
ERROR: Native python-coverage (version: %s) is required to be
installed on your PYTHONPATH to run this test. Recommendation:
- sudo pip install python-coverage
+ sudo apt-get install pip
+ sudo pip install --upgrade coverage
%s""") % (version, msg)
sys.exit(1)
@@ -35,7 +36,7 @@ def covered_main(includes, require_native=None):
import coverage
if require_native is not None:
got_ver = coverage.__version__
- if not coverage.collector.CTracer:
+ if not getattr(coverage.collector, 'CTracer', None):
native_error((
"Native python-coverage module required.\n"
"Pure-python implementation (version: %s) found: %s"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698