]> granicus.if.org Git - python/commitdiff
Fixed the serve.py script.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 11 Jan 2014 09:52:20 +0000 (11:52 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 11 Jan 2014 09:52:20 +0000 (11:52 +0200)
The application object must return an iterable yielding bytestrings.

Tools/scripts/serve.py

index 68c25f057f32eab4f20243eaab37a8ed73f2aa41..dae21f2260ff13e9c63d46e2330f5d36111e97f5 100755 (executable)
@@ -22,7 +22,7 @@ def app(environ, respond):
         return util.FileWrapper(open(fn, "rb"))
     else:
         respond('404 Not Found', [('Content-Type', 'text/plain')])
-        return ['not found']
+        return [b'not found']
 
 if __name__ == '__main__':
     path = sys.argv[1]