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

Unified Diff: git_cl.py

Issue 2061023003: git_cl: stop using deprecated except syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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: 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(
« 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