Despite its name, ElementTree.tostring() returns already-encoded
bytes() instead of a string in Python 3; sys.stdout doesn't like that.
---
 make-man-index.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/make-man-index.py b/make-man-index.py
index 1e67287..8789d99 100755
--- a/make-man-index.py
+++ b/make-man-index.py
@@ -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))
-- 
1.7.11.3

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to