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

Unified Diff: subprocess2.py

Issue 245133003: More explicit error message (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Style fixes Created 6 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: subprocess2.py
diff --git a/subprocess2.py b/subprocess2.py
index 716ef20faed48ffc9866e5da77a5207927bf857d..6e407926b94359385c31b9f9dc7f4fb1898f16d7 100644
--- a/subprocess2.py
+++ b/subprocess2.py
@@ -248,8 +248,9 @@ class Popen(subprocess.Popen):
'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.
- raise OSError('%s or %s probably doesn\'t exist' %
- (kwargs.get('cwd'), args[0]))
+ raise OSError('Execution failed with error: %s.\n'
+ 'Check that %s or %s exist and have execution permission.'
M-A Ruel 2014/04/29 17:19:23 optional: if you want to be more helpful, you coul
pgervais 2014/04/29 17:26:58 That would indeed be cleaner, but str(e) gives tha
+ % (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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698