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

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

Issue 103433002: [telemetry] Script for finding all Telemetry dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: 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 7ed2613a2eac91376fd71b1ca360bab83a93e5b6..9c340a887c0bac8dc79dee5d211f53774bd7fb56 100644
--- a/tools/telemetry/telemetry/page/cloud_storage.py
+++ b/tools/telemetry/telemetry/page/cloud_storage.py
@@ -27,7 +27,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):
return 'Run prodaccess to authenticate.'
else:
return ('To configure your credentials:\n'
@@ -72,7 +72,7 @@ def _DownloadGsutil():
return os.path.join(_DOWNLOAD_PATH, 'gsutil')
-def _FindGsutil():
+def FindGsutil():
"""Return the gsutil executable path. If we can't find it, download it."""
# Look for a depot_tools installation.
gsutil_path = _FindExecutableInPath(
@@ -89,7 +89,7 @@ def _FindGsutil():
return _DownloadGsutil()
-def _SupportsProdaccess(gsutil_path):
+def SupportsProdaccess(gsutil_path):
def GsutilSupportsProdaccess():
with open(gsutil_path, 'r') as gsutil:
return 'prodaccess' in gsutil.read()
@@ -98,8 +98,7 @@ def _SupportsProdaccess(gsutil_path):
def _RunCommand(args):
- gsutil_path = _FindGsutil()
-
+ gsutil_path = FindGsutil()
gsutil = subprocess.Popen([sys.executable, gsutil_path] + args,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = gsutil.communicate()

Powered by Google App Engine
This is Rietveld 408576698