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

Unified Diff: gclient_utils.py

Issue 501143: Remove gclient-specific hacks from trychange into gcl. (Closed)
Patch Set: Small unit test fix Created 11 years 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
« gcl.py ('K') | « gcl.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 81379c30e886d110b9aaf23bda819cf6bf72dcbe..6ea091c12ce1624c2691a136bce0f06bf75a92ce 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -40,12 +40,15 @@ def CheckCall(command, cwd=None):
Works on python 2.4
"""
- process = subprocess.Popen(command, cwd=cwd,
- shell=sys.platform.startswith('win'),
- stdout=subprocess.PIPE)
- output = process.communicate()[0]
- if process.retcode:
- raise CheckCallError(command, cwd, process.retcode, output)
+ try:
+ process = subprocess.Popen(command, cwd=cwd,
+ shell=sys.platform.startswith('win'),
+ stdout=subprocess.PIPE)
+ output = process.communicate()[0]
+ except OSError, e:
+ raise CheckCallError(command, cwd, errno, None)
+ if process.returncode:
+ raise CheckCallError(command, cwd, process.returncode, output)
return output
« gcl.py ('K') | « gcl.py ('k') | tests/gclient_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698