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:
@@ -470,7 +470,7 @@ class WebSocketRequestHandler(SimpleHTTPRequestHandler):
|
|||||||
|
|
||||||
def new_websocket_client(self):
|
def new_websocket_client(self):
|
||||||
""" Do something with a WebSockets client connection. """
|
""" 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):
|
def do_HEAD(self):
|
||||||
if self.only_upgrade:
|
if self.only_upgrade:
|
||||||
|
|||||||
Reference in New Issue
Block a user