Remove gclient-specific hacks from trychange into gcl.
Remove upload dependency.
This is towards making trychange.py work mostly standalone for the webkit try server.
TEST=unit tests and tested both gcl try and git-try.
Review URL: http://codereview.chromium.org/501143
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35071 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 81379c3..6ea091c 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -40,12 +40,15 @@
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