Urwid 1.1 compatibility.

This commit is contained in:
Aldo Cortesi 2012-10-29 09:30:59 +13:00
parent 68f1000e42
commit 57d6650e8e
2 changed files with 4 additions and 4 deletions

View File

@ -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):

View File

@ -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