Drop trailing semicolons
This commit is contained in:
parent
d19312ba75
commit
12dd0c738e
|
|
@ -64,7 +64,7 @@ class WebsockifySysLogHandler(handlers.SysLogHandler):
|
|||
pri = self.encodePriority(self.facility,
|
||||
self.mapPriority(record.levelname))
|
||||
|
||||
timestamp = time.strftime(self._timestamp_fmt, time.gmtime());
|
||||
timestamp = time.strftime(self._timestamp_fmt, time.gmtime())
|
||||
|
||||
hostname = socket.gethostname()[:self._max_hostname]
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class WebSocket:
|
|||
connect() must retain the same arguments.
|
||||
"""
|
||||
|
||||
self.client = True;
|
||||
self.client = True
|
||||
|
||||
uri = urlparse(uri)
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ class WebSocket:
|
|||
|
||||
accept = headers.get('Sec-WebSocket-Accept')
|
||||
if accept is None:
|
||||
raise Exception("Missing Sec-WebSocket-Accept header");
|
||||
raise Exception("Missing Sec-WebSocket-Accept header")
|
||||
|
||||
expected = sha1((self._key + self.GUID).encode("ascii")).digest()
|
||||
expected = b64encode(expected).decode("ascii")
|
||||
|
|
@ -214,7 +214,7 @@ class WebSocket:
|
|||
del self._key
|
||||
|
||||
if accept != expected:
|
||||
raise Exception("Invalid Sec-WebSocket-Accept header");
|
||||
raise Exception("Invalid Sec-WebSocket-Accept header")
|
||||
|
||||
self.protocol = headers.get('Sec-WebSocket-Protocol')
|
||||
if len(protocols) == 0:
|
||||
|
|
@ -258,7 +258,7 @@ class WebSocket:
|
|||
|
||||
ver = headers.get('Sec-WebSocket-Version')
|
||||
if ver is None:
|
||||
raise Exception("Missing Sec-WebSocket-Version header");
|
||||
raise Exception("Missing Sec-WebSocket-Version header")
|
||||
|
||||
# HyBi-07 report version 7
|
||||
# HyBi-08 - HyBi-12 report version 8
|
||||
|
|
@ -270,7 +270,7 @@ class WebSocket:
|
|||
|
||||
key = headers.get('Sec-WebSocket-Key')
|
||||
if key is None:
|
||||
raise Exception("Missing Sec-WebSocket-Key header");
|
||||
raise Exception("Missing Sec-WebSocket-Key header")
|
||||
|
||||
# Generate the hash value for the accept header
|
||||
accept = sha1((key + self.GUID).encode("ascii")).digest()
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ def websockify_init():
|
|||
opts.wrap_cmd = None
|
||||
|
||||
if not websockifyserver.ssl and opts.ssl_target:
|
||||
parser.error("SSL target requested and Python SSL module not loaded.");
|
||||
parser.error("SSL target requested and Python SSL module not loaded.")
|
||||
|
||||
if opts.ssl_only and not os.path.exists(opts.cert):
|
||||
parser.error("SSL only and %s not found" % opts.cert)
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ class WebSockifyServer():
|
|||
if connect and not (port or unix_socket):
|
||||
raise Exception("Connect mode requires a port")
|
||||
if use_ssl and not ssl:
|
||||
raise Exception("SSL socket requested but Python SSL module not loaded.");
|
||||
raise Exception("SSL socket requested but Python SSL module not loaded.")
|
||||
if not connect and use_ssl:
|
||||
raise Exception("SSL only supported in connect mode (for now)")
|
||||
if not connect:
|
||||
|
|
|
|||
Loading…
Reference in New Issue