make-man-index.py: compatibility with Python 3

Despite its name, ElementTree.tostring() returns already-encoded
bytes() instead of a string in Python 3; sys.stdout doesn't like that.
This commit is contained in:
Mantas Mikulėnas
2012-07-25 11:26:22 +02:00
committed by Kay Sievers
parent 669241a076
commit b56d18ee60
+2
View File
@@ -72,5 +72,7 @@ hr = SubElement(body, 'hr')
p = SubElement(body, 'p')
p.text = "This index contains %s entries, referring to %i individual manual pages." % (len(index), len(argv)-1)
if hasattr(stdout, "buffer"):
stdout = stdout.buffer
prettify(html)
stdout.write(tostring(html))