aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console.py
diff options
context:
space:
mode:
authorThomas Roth <code@leveldown.de>2010-02-24 18:25:24 +0100
committerThomas Roth <code@leveldown.de>2010-02-24 18:25:24 +0100
commit22b77e32cd121a43098d0f204e262ac8f8114e30 (patch)
tree4b5073f65c62a7e703c1221e5f2883164f8e7a97 /libmproxy/console.py
parent8eb8814387bcd827d537ec27c685bbff07d7fcdb (diff)
downloadmitmproxy-22b77e32cd121a43098d0f204e262ac8f8114e30.tar.gz
mitmproxy-22b77e32cd121a43098d0f204e262ac8f8114e30.tar.bz2
mitmproxy-22b77e32cd121a43098d0f204e262ac8f8114e30.zip
Fixes compatibility with Urwid >0.9.9
Diffstat (limited to 'libmproxy/console.py')
-rw-r--r--libmproxy/console.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py
index 0b44e7af..a655ff74 100644
--- a/libmproxy/console.py
+++ b/libmproxy/console.py
@@ -66,7 +66,7 @@ class ConnectionItem(urwid.WidgetWrap):
def intercept(self):
self.intercepting = True
- self.w = self.get_text()
+ self._w = self.get_text()
def get_text(self, nofocus=False):
return urwid.Text(self.flow.get_text(nofocus))
@@ -126,11 +126,11 @@ class ConnectionListView(urwid.ListWalker):
class ConnectionViewHeader(urwid.WidgetWrap):
def __init__(self, flow):
self.flow = flow
- self.w = urwid.Text(flow.get_text(nofocus=True, padding=0))
+ self._w = urwid.Text(flow.get_text(nofocus=True, padding=0))
def refresh_connection(self, f):
if f == self.flow:
- self.w = urwid.Text(f.get_text(nofocus=True, padding=0))
+ self._w = urwid.Text(f.get_text(nofocus=True, padding=0))
class ConnectionView(urwid.WidgetWrap):
@@ -224,13 +224,13 @@ class ConnectionView(urwid.WidgetWrap):
def view_request(self):
self.viewing = self.REQ
body = self._conn_text(self.flow.request)
- self.w = self.wrap_body(self.REQ, body)
+ self._w = self.wrap_body(self.REQ, body)
def view_response(self):
if self.flow.response:
self.viewing = self.RESP
body = self._conn_text(self.flow.response)
- self.w = self.wrap_body(self.RESP, body)
+ self._w = self.wrap_body(self.RESP, body)
def refresh_connection(self, c=None):
if c == self.flow:
@@ -307,7 +307,7 @@ class ConnectionView(urwid.WidgetWrap):
self.view_request()
elif key in ("up", "down", "page up", "page down"):
# Why doesn't this just work??
- self.w.body.keypress(size, key)
+ self._w.body.keypress(size, key)
elif key == "a":
self.flow.accept_intercept()
self.master.view_connection(self.flow)
@@ -395,10 +395,10 @@ class ActionBar(urwid.WidgetWrap):
return True
def prompt(self, prompt):
- self.w = urwid.Edit(prompt)
+ self._w = urwid.Edit(prompt)
def message(self, message):
- self.w = urwid.Text(message)
+ self._w = urwid.Text(message)
class StatusBar(urwid.WidgetWrap):
@@ -406,7 +406,7 @@ class StatusBar(urwid.WidgetWrap):
self.master, self.text = master, text
self.ab = ActionBar()
self.ib = urwid.AttrWrap(urwid.Text(""), 'foot')
- self.w = urwid.Pile([self.ib, self.ab])
+ self._w = urwid.Pile([self.ib, self.ab])
self.redraw()
def redraw(self):