Fix error with modern Python 2.X versions:

TypeError: exceptions must be old-style classes or derived from
BaseException, not str

Thus, we are not allowed to raise a string. Raise Exception instead.
This commit is contained in:
Peter Åstrand (astrand) 2013-03-18 12:04:50 +01:00
parent 7b3dd8a6f5
commit 70eb75a3e6
1 changed files with 1 additions and 1 deletions

View File

@ -470,7 +470,7 @@ class WebSocketRequestHandler(SimpleHTTPRequestHandler):
def new_websocket_client(self):
""" Do something with a WebSockets client connection. """
raise("WebSocketRequestHandler.new_websocket_client() must be overloaded")
raise Exception("WebSocketRequestHandler.new_websocket_client() must be overloaded")
def do_HEAD(self):
if self.only_upgrade: