diff --git a/subprocess2.py b/subprocess2.py index 6e138a503f..21e3487851 100644 --- a/subprocess2.py +++ b/subprocess2.py @@ -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 diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py index 96b507959b..50e7fd72c0 100755 --- a/tests/gclient_smoketest.py +++ b/tests/gclient_smoketest.py @@ -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',