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

Unified Diff: gcl.py

Issue 6985002: Make gcl and git-cl don't throw when a vim user does :cg (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 7 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 | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 413e2bb6d361918276ff823db8d92a561e12b55f..f64f67221863c691754b415527ae7b82ab7e18d6 100755
--- a/gcl.py
+++ b/gcl.py
@@ -1119,8 +1119,12 @@ def CMDchange(args):
if sys.platform == 'win32' and os.environ.get('TERM') == 'msys':
# Msysgit requires the usage of 'env' to be present.
cmd = 'env ' + cmd
- # shell=True to allow the shell to handle all forms of quotes in $EDITOR.
- subprocess.check_call(cmd, shell=True)
+ try:
+ # shell=True to allow the shell to handle all forms of quotes in
+ # $EDITOR.
+ subprocess.check_call(cmd, shell=True)
+ except subprocess.CalledProcessError, e:
+ ErrorExit('Editor returned %d' % e.returncode)
result = gclient_utils.FileRead(filename, 'r')
finally:
os.remove(filename)
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698