Run 2to3 over Doc/tools/.
diff --git a/Doc/tools/sgmlconv/esis2sgml.py b/Doc/tools/sgmlconv/esis2sgml.py
index 81294d1..10ec83a 100755
--- a/Doc/tools/sgmlconv/esis2sgml.py
+++ b/Doc/tools/sgmlconv/esis2sgml.py
@@ -44,8 +44,7 @@
def format_attrs(attrs, xml=0):
- attrs = attrs.items()
- attrs.sort()
+ attrs = sorted(attrs.items())
parts = []
append = parts.append
for name, value in attrs:
@@ -149,7 +148,7 @@
ofp.write("&%s;" % data)
knownempty = 0
else:
- raise RuntimeError, "unrecognized ESIS event type: '%s'" % type
+ raise RuntimeError("unrecognized ESIS event type: '%s'" % type)
if LIST_EMPTIES:
dump_empty_element_names(knownempties)
@@ -170,8 +169,7 @@
if gi:
d[gi] = gi
fp = open(EMPTIES_FILENAME, "w")
- gilist = d.keys()
- gilist.sort()
+ gilist = sorted(d.keys())
fp.write("\n".join(gilist))
fp.write("\n")
fp.close()