Make CClose exception work in python 2.4.

Fixes https://github.com/kanaka/websockify/issues/41
This commit is contained in:
Joel Martin 2012-05-10 08:04:30 -05:00
parent 7a4dbad3e8
commit 19a9730744
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.new_client()
except self.CClose as e:
except self.CClose:
# Close the client
_, exc, _ = sys.exc_info()
if self.client:
print exc
print repr(exc.args)
self.send_close(exc.args[0], exc.args[1])
except self.EClose:
_, exc, _ = sys.exc_info()