aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/websockets/frame.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-05-31 19:32:08 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-05-31 19:32:08 +1200
commitb2f63458fcda7878d5cf674c2f1e9ca7db5bf3ce (patch)
tree639b7e8408a52dc8828f579f324dab065e4b4cb2 /netlib/websockets/frame.py
parentec34cae6181d6af0150ac730d70b96104a07e9d5 (diff)
downloadmitmproxy-b2f63458fcda7878d5cf674c2f1e9ca7db5bf3ce.tar.gz
mitmproxy-b2f63458fcda7878d5cf674c2f1e9ca7db5bf3ce.tar.bz2
mitmproxy-b2f63458fcda7878d5cf674c2f1e9ca7db5bf3ce.zip
Move human-friendly format functions to netlib.human, remove redundant implementations
Diffstat (limited to 'netlib/websockets/frame.py')
-rw-r--r--netlib/websockets/frame.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/netlib/websockets/frame.py b/netlib/websockets/frame.py
index da5a97f3..cf8917c1 100644
--- a/netlib/websockets/frame.py
+++ b/netlib/websockets/frame.py
@@ -9,6 +9,7 @@ import six
from .protocol import Masker
from netlib import tcp
from netlib import utils
+from netlib import human
MAX_16_BIT_INT = (1 << 16)
@@ -98,7 +99,7 @@ class FrameHeader(object):
if self.masking_key:
vals.append(":key=%s" % repr(self.masking_key))
if self.payload_length:
- vals.append(" %s" % utils.pretty_size(self.payload_length))
+ vals.append(" %s" % human.pretty_size(self.payload_length))
return "".join(vals)
def human_readable(self):