summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-03 17:09:36 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-03 17:09:36 (GMT)
commitf767f08e290d0caa42148083940a08e8425b18f2 (patch)
treed195ba772283ff61ddc60bb3d2c5677bfa8e1aa3 /Tools
parent6b54e1f7826143fc33866110b5c7c8896349389f (diff)
downloadcpython-f767f08e290d0caa42148083940a08e8425b18f2.zip
cpython-f767f08e290d0caa42148083940a08e8425b18f2.tar.gz
cpython-f767f08e290d0caa42148083940a08e8425b18f2.tar.bz2
Issue #8867: Fix `Tools/scripts/serve.py` to work with files containing
non-ASCII content.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/serve.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/serve.py b/Tools/scripts/serve.py
index c3b7bdb..89b3d62 100755
--- a/Tools/scripts/serve.py
+++ b/Tools/scripts/serve.py
@@ -19,7 +19,7 @@ def app(environ, respond):
if os.path.exists(fn):
respond('200 OK', [('Content-Type', type)])
- return util.FileWrapper(open(fn))
+ return util.FileWrapper(open(fn, "rb"))
else:
respond('404 Not Found', [('Content-Type', 'text/plain')])
return ['not found']