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:
parent
7b3dd8a6f5
commit
70eb75a3e6
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue