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
changes/01/332501/1
sbc@chromium.org 11 years ago
parent 79d6237ec0
commit 217330f2f0

@ -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',

Loading…
Cancel
Save