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
diff --git a/subprocess2.py b/subprocess2.py
index 6e138a5..21e3487 100644
--- a/subprocess2.py
+++ b/subprocess2.py
@@ -40,7 +40,7 @@
     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 96b5079..50e7fd7 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -517,8 +517,8 @@
         ('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',