Commit 217330f2 authored by sbc@chromium.org's avatar sbc@chromium.org

Add quotes around command line in subproccess error message

Allows the command line itself to be distinguished
from the surrounding error message.

Review URL: https://codereview.chromium.org/1152443004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295481 0039d316-1c4b-4281-b951-d872f2087c98
parent 79d6237e
......@@ -40,7 +40,7 @@ class CalledProcessError(subprocess.CalledProcessError):
self.cwd = cwd
def __str__(self):
out = 'Command %s returned non-zero exit status %s' % (
out = 'Command %r returned non-zero exit status %s' % (
' '.join(self.cmd), self.returncode)
if self.cwd:
out += ' in ' + self.cwd
......
......@@ -517,8 +517,8 @@ class GClientSmokeGIT(GClientSmokeBase):
('running', self.root_dir), # pre-deps hook
('running', self.root_dir), # pre-deps hook (fails)
]
expected_stderr = ('Error: Command /usr/bin/python -c import sys; '
'sys.exit(1) returned non-zero exit status 1 in %s\n'
expected_stderr = ("Error: Command '/usr/bin/python -c import sys; "
"sys.exit(1)' returned non-zero exit status 1 in %s\n"
% self.root_dir)
stdout, stderr, retcode = self.gclient(['sync', '--deps', 'mac', '--jobs=1',
'--revision',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment