diff options
author | Hiroki Ohtani <liris.pp@gmail.com> | 2015-03-23 08:26:15 +0900 |
---|---|---|
committer | Hiroki Ohtani <liris.pp@gmail.com> | 2015-03-23 08:26:15 +0900 |
commit | cac1cf234e7f1560556c817f1a828e4e3b53a608 (patch) | |
tree | b36b580ef22be5576282e702cfbf55062010878c | |
parent | 794e7de7204517c8900c35511b72d95cc335232f (diff) | |
download | websocket-client-cac1cf234e7f1560556c817f1a828e4e3b53a608.tar.gz |
use "%r".
-rw-r--r-- | websocket/_abnf.py | 4 | ||||
-rw-r--r-- | websocket/_http.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/websocket/_abnf.py b/websocket/_abnf.py index 1b2b855..9242337 100644 --- a/websocket/_abnf.py +++ b/websocket/_abnf.py @@ -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 ""
\ No newline at end of file + self.mask = recv_fn(4) if self.has_mask() else "" diff --git a/websocket/_http.py b/websocket/_http.py index 6cba5e7..1cf5f1a 100644 --- a/websocket/_http.py +++ b/websocket/_http.py @@ -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): |