summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-15 10:34:59 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-15 11:30:42 -0500
commitdd6f5e4fb8a18822d1de8f98d5b24d1cb4d9e851 (patch)
tree0244c2bf94b7869be07fa73b7ca14d9569b78d59
parentf6b6728d1dc92754026a7f04d26f83e2290778f4 (diff)
make-man-index: work around UnicodeDecodeError
-rwxr-xr-xmake-man-index.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/make-man-index.py b/make-man-index.py
index 5fa90aefdb..2dbc2da995 100755
--- a/make-man-index.py
+++ b/make-man-index.py
@@ -21,6 +21,7 @@
import collections
import xml.etree.ElementTree as tree
import sys
+MDASH = ' — ' if sys.version_info.major >= 3 else ' -- '
TEMPLATE = '''\
<refentry id="systemd.index">
@@ -91,7 +92,7 @@ def add_letter(template, letter, pages):
d = tree.SubElement(b, 'manvolnum')
d.text = section
- b.tail = ' — ' + purpose # + ' (' + p + ')'
+ b.tail = MDASH + purpose # + ' (' + p + ')'
tree.SubElement(para, 'sbr')