Commit 98141ebe authored by Vincent Pelletier's avatar Vincent Pelletier

Fix another NameError on single prefix.

parent 46f63fd5
......@@ -831,12 +831,14 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
out.write('</head><body><h1>Overall</h1>')
site_list = list(enumerate(sorted(per_site.iteritems(),
key=lambda x: site_caption_dict[x[0]])))
html_site_caption_dict = {}
for i, (site_id, _) in site_list:
html_site_caption_dict[site_id] = unquoteToHtml(site_caption_dict[site_id],
encoding)
if len(per_site) > 1:
out.write('<h2>Index</h2><ol>')
html_site_caption_dict = {}
for i, (site_id, _) in site_list:
html_caption = unquoteToHtml(site_caption_dict[site_id], encoding)
html_site_caption_dict[site_id] = html_caption
for i, (site_id, html_caption) in enumerate(
html_site_caption_dict.iteritems()):
out.write('<li><a href="#%s" title="%s">%s</a></li>' % (i,
escape(repr(site_id), quote=True), html_caption))
out.write('</ol>')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment