diff options
author | Mantas Mikulėnas <grawity@gmail.com> | 2012-07-25 02:59:28 +0300 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-07-25 11:26:22 +0200 |
commit | b56d18ee605d5dfb0680c154010178d0da2e4af3 (patch) | |
tree | 9b8d9ae35c1581bfbf640d573896e57816d32dbe /make-man-index.py | |
parent | 669241a076108e0483d7d8475beaa506106d077e (diff) |
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.
Diffstat (limited to 'make-man-index.py')
-rwxr-xr-x | make-man-index.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/make-man-index.py b/make-man-index.py index 1e67287c08..8789d995ec 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)) |