Skip to content

Commit e718272

Browse files
committed
Applied a patch from dkg@fifthhorseman.net: py3 compatibility: Use modern form of exception handling
- Legacy-Id: 15890
1 parent 8840efa commit e718272

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/utils/draft.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,8 +1325,8 @@ def _main(outfile=sys.stdout):
13251325

13261326
try:
13271327
opts, files = getopt.gnu_getopt(sys.argv[1:], "dhatTv", ["debug", "getauthors", "attribs", "attributes", "help", "timestamp", "notimestamp", "trace", "version",])
1328-
except Exception, e:
1329-
print "%s: %s" % (program, e)
1328+
except Exception as e:
1329+
print("%s: %s" % (program, e))
13301330
sys.exit(1)
13311331

13321332
# parse options
@@ -1396,7 +1396,7 @@ def _main(outfile=sys.stdout):
13961396
_main()
13971397
except KeyboardInterrupt:
13981398
raise
1399-
except Exception, e:
1399+
except Exception as e:
14001400
if opt_debug:
14011401
raise
14021402
else:

0 commit comments

Comments
 (0)