Skip to content

Commit 825fc8b

Browse files
committed
python#1867: fix a few 3.0 incompatibilities in pydoc.
1 parent fceab5a commit 825fc8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/pydoc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,9 +1946,9 @@ class DocHandler(BaseHTTPServer.BaseHTTPRequestHandler):
19461946
def send_document(self, title, contents):
19471947
try:
19481948
self.send_response(200)
1949-
self.send_header('Content-Type', 'text/html')
1949+
self.send_header('Content-Type', 'text/html; charset=UTF-8')
19501950
self.end_headers()
1951-
self.wfile.write(html.page(title, contents))
1951+
self.wfile.write(html.page(title, contents).encode('utf-8'))
19521952
except IOError: pass
19531953

19541954
def do_GET(self):
@@ -1974,7 +1974,7 @@ def bltinlink(name):
19741974
return '<a href="%s.html">%s</a>' % (name, name)
19751975
names = filter(lambda x: x != '__main__',
19761976
sys.builtin_module_names)
1977-
contents = html.multicolumn(names, bltinlink)
1977+
contents = html.multicolumn(list(names), bltinlink)
19781978
indices = ['<p>' + html.bigsection(
19791979
'Built-in Modules', '#ffffff', '#ee77aa', contents)]
19801980

0 commit comments

Comments
 (0)