Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index b01b7dbbc22388231d829f68ff72ce2d42ee81dd..2529027250a858d58f58e7f5c64c40426c15c9de 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -1323,7 +1323,7 @@ class Changelist(object): |
default_presubmit=None, may_prompt=may_prompt, |
rietveld_obj=self._codereview_impl.GetRieveldObjForPresubmit(), |
gerrit_obj=self._codereview_impl.GetGerritObjForPresubmit()) |
- except presubmit_support.PresubmitFailure, e: |
+ except presubmit_support.PresubmitFailure as e: |
DieWithError( |
('%s\nMaybe your depot_tools is out of date?\n' |
'If all fails, contact maruel@') % e) |
@@ -1713,7 +1713,7 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase): |
try: |
return self.RpcServer().set_flag( |
self.GetIssue(), self.GetPatchset(), flag, value) |
- except urllib2.HTTPError, e: |
+ except urllib2.HTTPError as e: |
if e.code == 404: |
DieWithError('The issue %s doesn\'t exist.' % self.GetIssue()) |
if e.code == 403: |
@@ -4849,7 +4849,7 @@ def CMDformat(parser, args): |
# Locate the clang-format binary in the checkout |
try: |
clang_format_tool = clang_format.FindClangFormatToolInChromiumTree() |
- except clang_format.NotFoundError, e: |
+ except clang_format.NotFoundError as e: |
DieWithError(e) |
if opts.full: |
@@ -4865,7 +4865,7 @@ def CMDformat(parser, args): |
try: |
script = clang_format.FindClangFormatScriptInChromiumTree( |
'clang-format-diff.py') |
- except clang_format.NotFoundError, e: |
+ except clang_format.NotFoundError as e: |
DieWithError(e) |
cmd = [sys.executable, script, '-p0'] |
@@ -5021,7 +5021,7 @@ def main(argv): |
return dispatcher.execute(OptionParser(), argv) |
except auth.AuthenticationError as e: |
DieWithError(str(e)) |
- except urllib2.HTTPError, e: |
+ except urllib2.HTTPError as e: |
if e.code != 500: |
raise |
DieWithError( |