aboutsummaryrefslogtreecommitdiffstats
path: root/writeHTML.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-05-21 18:43:36 +0000
committerNick Mathewson <nickm@torproject.org>2003-05-21 18:43:36 +0000
commitbeb61b16d4947fca7801c2e0077b3a2e944c2023 (patch)
tree4e1fe5c04b77469cc9359a4b3a8feb58e3842cbf /writeHTML.py
parentcf63ed4edebe9803a982255d4b440d18d4ee3f54 (diff)
downloadanonbib-beb61b16d4947fca7801c2e0077b3a2e944c2023.tar.gz
Fix a couple of bugs
svn:r24
Diffstat (limited to 'writeHTML.py')
-rw-r--r--writeHTML.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/writeHTML.py b/writeHTML.py
index ceb14e4..019795f 100644
--- a/writeHTML.py
+++ b/writeHTML.py
@@ -4,7 +4,7 @@ import sys
import re
import os
-assert sys.version[:3] >= (2,2,0)
+assert sys.version_info[:3] >= (2,2,0)
import BibTeX
import config
@@ -22,14 +22,14 @@ def writeBody(f, sections, section_urls):
section_urls: map from sectionname to external url'''
for s, entries in sections:
u = section_urls.get(s)
- s = re.sub(r'\s+', ' ', s.strip())
- s = s.replace(" ", "&nbsp;")
+ sDisp = re.sub(r'\s+', ' ', s.strip())
+ sDisp = sDisp.replace(" ", "&nbsp;")
if u:
print >>f, ('<h3><a name="%s"><a href="%s">%s</a></a></h3>'%(
- (BibTeX.url_untranslate(s), u, s)))
+ (BibTeX.url_untranslate(s), u, sDisp)))
else:
print >>f, ('<h3><a name="%s">%s</a></h3>'%(
- BibTeX.url_untranslate(s),s))
+ BibTeX.url_untranslate(s),sDisp))
print >>f, "<ul class='expand'>"
for e in entries:
print >>f, e.to_html()