mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
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:
parent
669241a076
commit
b56d18ee60
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user