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

Unified Diff: tools/telemetry/telemetry/page/cloud_storage.py

Issue 291293002: Fix check preventing gsutil from being included in standalone telemetry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/cloud_storage.py
diff --git a/tools/telemetry/telemetry/page/cloud_storage.py b/tools/telemetry/telemetry/page/cloud_storage.py
index 4eb0745540a41e311fc6debcc85177e5f2d07b26..dbbd183ca3880cbe1236b00172a23929ebf4ac97 100644
--- a/tools/telemetry/telemetry/page/cloud_storage.py
+++ b/tools/telemetry/telemetry/page/cloud_storage.py
@@ -28,7 +28,7 @@ _DOWNLOAD_PATH = os.path.join(util.GetTelemetryDir(), 'third_party', 'gsutil')
class CloudStorageError(Exception):
@staticmethod
def _GetConfigInstructions(gsutil_path):
- if SupportsProdaccess(gsutil_path):
+ if SupportsProdaccess(gsutil_path) and _FindExecutableInPath('prodaccess'):
return 'Run prodaccess to authenticate.'
else:
return ('To configure your credentials:\n'
@@ -92,11 +92,8 @@ def FindGsutil():
def SupportsProdaccess(gsutil_path):
- def GsutilSupportsProdaccess():
- with open(gsutil_path, 'r') as gsutil:
- return 'prodaccess' in gsutil.read()
-
- return _FindExecutableInPath('prodaccess') and GsutilSupportsProdaccess()
+ with open(gsutil_path, 'r') as gsutil:
+ return 'prodaccess' in gsutil.read()
def _RunCommand(args):
« 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