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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/cros_test_case.py

Issue 269773004: Fix credentials initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tengs feedback Created 6 years, 8 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/core/backends/chrome/cros_test_case.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_test_case.py b/tools/telemetry/telemetry/core/backends/chrome/cros_test_case.py
index e17df184a17c559a53f2d9fb4576c62d021d6367..5fd71d65be0e1748e25a57a950b9d9abaa37cecb 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_test_case.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_test_case.py
@@ -78,8 +78,8 @@ class CrOSTestCase(unittest.TestCase):
"""Returns credentials from file."""
credentials_path = os.path.join(os.path.dirname(__file__),
credentials_path)
- credentials = []
if os.path.isfile(credentials_path):
with open(credentials_path) as f:
- credentials = f.read().rstrip().split(':')
- return credentials
+ username, password = f.read().rstrip().split(':')
+ return (username, password)
+ return (None, None)
« 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