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