提交 960ff97b 编写于 作者: C Cole Robinson

apibuild: Fix errors on python3

Module 'string' function lower doesn't exist in python3. The canonical
way is to call .lower() on a str instance. Do that, and make the
exception handling more specific, which would have made this issue
obvious.
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 f5eacf2a
......@@ -2326,10 +2326,10 @@ class docBuilder:
for data in ('Summary', 'Description', 'Author'):
try:
output.write(" <%s>%s</%s>\n" % (
string.lower(data),
data.lower(),
escape(dict.info[data]),
string.lower(data)))
except:
data.lower()))
except KeyError:
self.warning("Header %s lacks a %s description" % (module, data))
if 'Description' in dict.info:
desc = dict.info['Description']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册