mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user