use "%r".
This commit is contained in:
@@ -110,7 +110,7 @@ class ABNF(object):
|
||||
raise WebSocketProtocolException("rsv is not implemented, yet")
|
||||
|
||||
if self.opcode not in ABNF.OPCODES:
|
||||
raise WebSocketProtocolException("Invalid opcode " + str(self.opcode))
|
||||
raise WebSocketProtocolException("Invalid opcode %r", self.opcode)
|
||||
|
||||
if self.opcode == ABNF.OPCODE_PING and not self.fin:
|
||||
raise WebSocketProtocolException("Invalid ping frame.")
|
||||
@@ -284,4 +284,4 @@ class FrameBuffer(object):
|
||||
return self.mask is None
|
||||
|
||||
def recv_mask(self, recv_fn):
|
||||
self.mask = recv_fn(4) if self.has_mask() else ""
|
||||
self.mask = recv_fn(4) if self.has_mask() else ""
|
||||
|
@@ -154,7 +154,7 @@ def _tunnel(sock, host, port, auth):
|
||||
|
||||
if status != 200:
|
||||
raise WebSocketProxyException(
|
||||
"failed CONNECT via proxy status: " + str(status))
|
||||
"failed CONNECT via proxy status: %r" + status)
|
||||
|
||||
|
||||
def read_headers(sock):
|
||||
|
Reference in New Issue
Block a user