From 8840efaef4cb7b9462f28dd531ceb887cf508cc6 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 14 Jan 2019 20:56:59 +0000 Subject: [PATCH] Applied a patch from dkg@fifthhorseman.net: py3 compatibility: use print function. - Legacy-Id: 15889 --- ietf/utils/draft.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ietf/utils/draft.py b/ietf/utils/draft.py index 9ba0d05b4..c4362e5fa 100755 --- a/ietf/utils/draft.py +++ b/ietf/utils/draft.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- python -*- from __future__ import unicode_literals +from __future__ import print_function """ NAME %(program)s - Extract meta-information from an IETF draft. @@ -1260,7 +1261,7 @@ def _output(docname, fields, outfile=sys.stdout): fields["day"] = day fields["month"] = month_names[int(month)] if month != "UNKNOWN" else "UNKNOWN" fields["year"] = year - print "%(doctag)s:%(name)s:%(company)s:%(email)s:%(country)s:%(docpages)s:%(month)s:%(year)s:%(day)s:" % fields + print("%(doctag)s:%(name)s:%(company)s:%(email)s:%(country)s:%(docpages)s:%(month)s:%(year)s:%(day)s:" % fields) else: if opt_attributes: def outputkey(key, fields): @@ -1319,7 +1320,7 @@ def _main(outfile=sys.stdout): if len(sys.argv) < 1: vars = globals() vars.update(locals()) - print __doc__ % vars + print(__doc__ % vars) sys.exit(1) try: @@ -1335,10 +1336,10 @@ def _main(outfile=sys.stdout): elif opt in ["-h", "--help"]: # Output this help text, then exit vars = globals() vars.update(locals()) - print __doc__ % vars + print(__doc__ % vars) sys.exit(1) elif opt in ["-v", "--version"]: # Output version information, then exit - print program, version + print(program, version) sys.exit(0) elif opt in ["--getauthors"]: # Output an (incomplete) getauthors-compatible format opt_getauthors = True