Skip to content

Commit 8840efa

Browse files
committed
Applied a patch from dkg@fifthhorseman.net: py3 compatibility: use print function.
- Legacy-Id: 15889
1 parent 5abcec4 commit 8840efa

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ietf/utils/draft.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python
22
# -*- python -*-
33
from __future__ import unicode_literals
4+
from __future__ import print_function
45
"""
56
NAME
67
%(program)s - Extract meta-information from an IETF draft.
@@ -1260,7 +1261,7 @@ def _output(docname, fields, outfile=sys.stdout):
12601261
fields["day"] = day
12611262
fields["month"] = month_names[int(month)] if month != "UNKNOWN" else "UNKNOWN"
12621263
fields["year"] = year
1263-
print "%(doctag)s:%(name)s:%(company)s:%(email)s:%(country)s:%(docpages)s:%(month)s:%(year)s:%(day)s:" % fields
1264+
print("%(doctag)s:%(name)s:%(company)s:%(email)s:%(country)s:%(docpages)s:%(month)s:%(year)s:%(day)s:" % fields)
12641265
else:
12651266
if opt_attributes:
12661267
def outputkey(key, fields):
@@ -1319,7 +1320,7 @@ def _main(outfile=sys.stdout):
13191320
if len(sys.argv) < 1:
13201321
vars = globals()
13211322
vars.update(locals())
1322-
print __doc__ % vars
1323+
print(__doc__ % vars)
13231324
sys.exit(1)
13241325

13251326
try:
@@ -1335,10 +1336,10 @@ def _main(outfile=sys.stdout):
13351336
elif opt in ["-h", "--help"]: # Output this help text, then exit
13361337
vars = globals()
13371338
vars.update(locals())
1338-
print __doc__ % vars
1339+
print(__doc__ % vars)
13391340
sys.exit(1)
13401341
elif opt in ["-v", "--version"]: # Output version information, then exit
1341-
print program, version
1342+
print(program, version)
13421343
sys.exit(0)
13431344
elif opt in ["--getauthors"]: # Output an (incomplete) getauthors-compatible format
13441345
opt_getauthors = True

0 commit comments

Comments
 (0)