Pull from websockify.

Fix python 2.4 CClose exception handling.
This commit is contained in:
Joel Martin 2012-05-10 08:05:47 -05:00
parent 4910600b71
commit 02d1f19b5f
1 changed files with 3 additions and 1 deletions

View File

@ -765,10 +765,12 @@ Sec-WebSocket-Accept: %s\r
self.ws_connection = True self.ws_connection = True
self.new_client() self.new_client()
except self.CClose as e: except self.CClose:
# Close the client # Close the client
_, exc, _ = sys.exc_info() _, exc, _ = sys.exc_info()
if self.client: if self.client:
print exc
print repr(exc.args)
self.send_close(exc.args[0], exc.args[1]) self.send_close(exc.args[0], exc.args[1])
except self.EClose: except self.EClose:
_, exc, _ = sys.exc_info() _, exc, _ = sys.exc_info()