Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: appengine/third_party_local/depot_tools/subprocess2.py

Issue 1052993003: Roll multiple files from depot_tools into luci. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/third_party_local/depot_tools/subprocess2.py
diff --git a/appengine/third_party_local/depot_tools/subprocess2.py b/appengine/third_party_local/depot_tools/subprocess2.py
index ac44555dcf5a038478ca172669035d974910382d..6e138a503fbbd22340ab74c65f2e4580536ac0ee 100644
--- a/appengine/third_party_local/depot_tools/subprocess2.py
+++ b/appengine/third_party_local/depot_tools/subprocess2.py
@@ -34,8 +34,8 @@ SUBPROCESS_CLEANUP_HACKED = False
class CalledProcessError(subprocess.CalledProcessError):
"""Augment the standard exception with more data."""
def __init__(self, returncode, cmd, cwd, stdout, stderr):
- super(CalledProcessError, self).__init__(returncode, cmd)
- self.stdout = stdout
+ super(CalledProcessError, self).__init__(returncode, cmd, output=stdout)
+ self.stdout = self.output # for backward compatibility.
self.stderr = stderr
self.cwd = cwd
@@ -247,9 +247,10 @@ class Popen(subprocess.Popen):
'http://code.google.com/p/chromium/wiki/CygwinDllRemappingFailure '
'to learn how to fix this error; you need to rebase your cygwin '
'dlls')
- # Popen() can throw OSError when cwd or args[0] doesn't exist. Let it go
- # through
- raise
+ # Popen() can throw OSError when cwd or args[0] doesn't exist.
+ raise OSError('Execution failed with error: %s.\n'
+ 'Check that %s or %s exist and have execution permission.'
+ % (str(e), kwargs.get('cwd'), args[0]))
def _tee_threads(self, input): # pylint: disable=W0622
"""Does I/O for a process's pipes using threads.
@@ -510,5 +511,5 @@ def check_output(args, **kwargs):
"""
kwargs.setdefault('stdin', VOID)
if 'stdout' in kwargs:
- raise ValueError('stdout argument not allowed, it will be overridden.')
+ raise ValueError('stdout argument not allowed, it would be overridden.')
return check_call_out(args, stdout=PIPE, **kwargs)[0]
« no previous file with comments | « appengine/third_party_local/depot_tools/subcommand.py ('k') | client/third_party/depot_tools/README.swarming » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698