aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console/common.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-03-13 23:03:46 +1100
committerAldo Cortesi <aldo@nullcube.com>2015-03-13 23:04:07 +1100
commit60dce08d546aef3698509bdb2572e9868902e016 (patch)
tree38f93dd04ba607b915dd9ebf6d60b27815c63b49 /libmproxy/console/common.py
parent87a3c710415878968f2333e1d7bc4adeccc3a9cb (diff)
downloadmitmproxy-60dce08d546aef3698509bdb2572e9868902e016.tar.gz
mitmproxy-60dce08d546aef3698509bdb2572e9868902e016.tar.bz2
mitmproxy-60dce08d546aef3698509bdb2572e9868902e016.zip
Remove compatibility shim used to interop with older versions of Urwid
Diffstat (limited to 'libmproxy/console/common.py')
-rw-r--r--libmproxy/console/common.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py
index c0da9bb3..6c0f481b 100644
--- a/libmproxy/console/common.py
+++ b/libmproxy/console/common.py
@@ -364,25 +364,3 @@ def format_flow(f, focus, extended=False, hostheader=False, padding=2):
return flowcache.format_flow(
tuple(sorted(d.items())), focus, extended, padding
)
-
-
-def int_version(v):
- SIG = 3
- v = urwid.__version__.split("-")[0].split(".")
- x = 0
- for i in range(min(SIG, len(v))):
- x += int(v[i]) * 10**(SIG-i)
- return x
-
-
-# We have to do this to be portable over 0.9.8 and 0.9.9 If compatibility
-# becomes a pain to maintain, we'll just mandate 0.9.9 or newer.
-class WWrap(urwid.WidgetWrap):
- if int_version(urwid.__version__) >= 990:
- def set_w(self, x):
- self._w = x
-
- def get_w(self):
- return self._w
-
- w = property(get_w, set_w)