Fixes #70. Thanks for the patch, I assume this is the same anonymous as before, cheers.

This commit is contained in:
Ryan Williams
2010-12-15 21:18:25 -08:00
parent 3e01bda00f
commit b8267b4931
2 changed files with 3 additions and 4 deletions

View File

@@ -65,4 +65,4 @@ Thanks To
* Holger Krekel, websocket example small fix
* mikepk, debugging MySQLdb/tpool issues
* Malcolm Cleaton, patch for Event exception handling
* Alexey Borzenkov, finding and fixing issue with Windows error detection (#53)
* Alexey Borzenkov, finding and fixing issue with Windows error detection (#53), finding and fixing error in websocket chat example (#70)

View File

@@ -27,9 +27,8 @@ def dispatch(environ, start_response):
return handle(environ, start_response)
else:
start_response('200 OK', [('content-type', 'text/html')])
return [open(os.path.join(
os.path.dirname(__file__),
'websocket_chat.html')).read() % PORT]
html_path = os.path.join(os.path.dirname(__file__), 'websocket_chat.html')
return [open(html_path).read() % {'port': PORT}]
if __name__ == "__main__":
# run an example app from the command line