mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-31 15:28:50 +00:00
Urwid 1.1 compatibility.
This commit is contained in:
parent
68f1000e42
commit
57d6650e8e
@ -431,7 +431,7 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
return str(v)
|
||||
self.stream_path = path
|
||||
|
||||
|
||||
|
||||
def _run_script_method(self, method, s, f):
|
||||
status, val = s.run(method, f)
|
||||
if val:
|
||||
@ -1007,7 +1007,7 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
self.eventlist.append(e)
|
||||
if len(self.eventlist) > EVENTLOG_SIZE:
|
||||
self.eventlist.pop(0)
|
||||
self.eventlist.set_focus(len(self.eventlist))
|
||||
self.eventlist.set_focus(len(self.eventlist)-1)
|
||||
|
||||
# Handlers
|
||||
def handle_log(self, l):
|
||||
|
@ -102,12 +102,12 @@ class BodyPile(urwid.Pile):
|
||||
class ConnectionItem(common.WWrap):
|
||||
def __init__(self, master, state, flow, focus):
|
||||
self.master, self.state, self.flow = master, state, flow
|
||||
self.focus = focus
|
||||
self.f = focus
|
||||
w = self.get_text()
|
||||
common.WWrap.__init__(self, w)
|
||||
|
||||
def get_text(self):
|
||||
return common.format_flow(self.flow, self.focus)
|
||||
return common.format_flow(self.flow, self.f)
|
||||
|
||||
def selectable(self):
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user