changeset f578e09cb16a in tryton-tools:default
details: https://hg.tryton.org/tryton-tools?cmd=changeset;node=f578e09cb16a
description:
Make hg hooks Python3 compatible
diffstat:
hgrietveld.py | 6 +++---
hgroundup.py | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r a8af841dae60 -r f578e09cb16a hgrietveld.py
--- a/hgrietveld.py Thu Aug 06 10:22:28 2020 +0200
+++ b/hgrietveld.py Wed Sep 23 00:33:19 2020 +0200
@@ -46,7 +46,7 @@
def update_issue(*args, **kwargs):
try:
_update_issue(*args, **kwargs)
- except:
+ except Exception:
traceback.print_exc()
raise
@@ -92,7 +92,7 @@
issues = {}
- for rev in xrange(start, len(repo)):
+ for rev in range(start, len(repo)):
ctx = repo[rev]
description = fromlocal(ctx.description().strip())
matches = ISSUE_PATTERN.finditer(description)
@@ -116,7 +116,7 @@
try:
send_comments(mailrelay, fromaddr, toaddr, issues)
ui.status("sent email to rietveld at " + toaddr + '\n')
- except Exception, err:
+ except Exception as err:
# make sure an issue updating rietveld does not prevent an
# otherwise successful push.
ui.warn("sending email to rietveld at %s failed: %s\n" %
diff -r a8af841dae60 -r f578e09cb16a hgroundup.py
--- a/hgroundup.py Thu Aug 06 10:22:28 2020 +0200
+++ b/hgroundup.py Wed Sep 23 00:33:19 2020 +0200
@@ -52,7 +52,7 @@
def update_issue(*args, **kwargs):
try:
_update_issue(*args, **kwargs)
- except:
+ except Exception:
traceback.print_exc()
raise
@@ -100,7 +100,7 @@
issues = {}
- for rev in xrange(start, len(repo)):
+ for rev in range(start, len(repo)):
ctx = repo[rev]
description = fromlocal(ctx.description().strip())
matches = ISSUE_PATTERN.finditer(description)
@@ -127,7 +127,7 @@
try:
send_comments(mailrelay, fromaddr, toaddr, issues, classname)
ui.status("sent email to roundup at " + toaddr + '\n')
- except Exception, err:
+ except Exception as err:
# make sure an issue updating roundup does not prevent an
# otherwise successful push.
ui.warn("sending email to roundup at %s failed: %s\n" %