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

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

Issue 297823002: Check for errors of cryptohome-path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py ('k') | 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_interface.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py b/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
index bad60225fd7651b77312ddb8cc86495419b8b7df..b5add7d4e9ffef3f6f57de299a661d5c8c2fa5a2 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
@@ -196,7 +196,7 @@ class CrOSInterface(object):
if "Connection timed out" in stderr:
raise OSError('Machine wasn\'t responding to ssh: %s' %
stderr)
- raise OSError('Unepected error: %s' % stderr)
+ raise OSError('Unexpected error: %s' % stderr)
exists = stdout == '1\n'
logging.debug("FileExistsOnDevice(<text>, %s)->%s" % (file_name, exists))
return exists
@@ -401,8 +401,11 @@ class CrOSInterface(object):
def CryptohomePath(self, user):
"""Returns the cryptohome mount point for |user|."""
- return self.RunCmdOnDevice(
- ['cryptohome-path', 'user', "'%s'" % user])[0].strip()
+ stdout, stderr = self.RunCmdOnDevice(
+ ['cryptohome-path', 'user', "'%s'" % user])
+ if stderr != '':
+ raise OSError('cryptohome-path failed: %s' % stderr)
+ return stdout.rstrip()
def IsCryptohomeMounted(self, username, is_guest):
"""Returns True iff |user|'s cryptohome is mounted."""
« no previous file with comments | « tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698