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

Unified Diff: gclient.py

Issue 1436763002: gclient: stop using deprecated except syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: rebase onto print changes Created 5 years, 1 month 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: gclient.py
diff --git a/gclient.py b/gclient.py
index f258890518b830655ec3a191134fcfe82d50bb2b..00bb95d7043c4ac5c76bb5f24099930a4d7cb077 100755
--- a/gclient.py
+++ b/gclient.py
@@ -638,7 +638,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
# Eval the content.
try:
exec(deps_content, global_scope, local_scope)
- except SyntaxError, e:
+ except SyntaxError as e:
gclient_utils.SyntaxErrorToError(filepath, e)
if use_strict:
for key, val in local_scope.iteritems():
@@ -983,7 +983,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
start_time = time.time()
gclient_utils.CheckCallAndFilterAndHeader(
hook, cwd=self.root.root_dir, always=True)
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
# Use a discrete exit status code of 2 to indicate that a hook action
# failed. Users of this script may wish to treat hook action failures
# differently from VC failures.
@@ -1008,7 +1008,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
start_time = time.time()
gclient_utils.CheckCallAndFilterAndHeader(
hook, cwd=self.root.root_dir, always=True)
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
# Use a discrete exit status code of 2 to indicate that a hook action
# failed. Users of this script may wish to treat hook action failures
# differently from VC failures.
@@ -1248,7 +1248,7 @@ want to set 'managed': False in .gclient.
self.config_content = content
try:
exec(content, config_dict)
- except SyntaxError, e:
+ except SyntaxError as e:
gclient_utils.SyntaxErrorToError('.gclient', e)
# Append any target OS that is not already being enforced to the tuple.
@@ -1443,7 +1443,7 @@ been automagically updated. The previous version is available at %s.old.
return {}
try:
exec(gclient_utils.FileRead(filename), scope)
- except SyntaxError, e:
+ except SyntaxError as e:
gclient_utils.SyntaxErrorToError(filename, e)
return scope['entries']
@@ -2312,7 +2312,7 @@ def main(argv):
except KeyboardInterrupt:
gclient_utils.GClientChildren.KillAllRemainingChildren()
raise
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
+ except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
print('Error: %s' % str(e), file=sys.stderr)
return 1
finally:
« 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