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