1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 20:38:00 +01:00

fix potential urwid compatibility problem

This commit is contained in:
Adam Blackburn
2010-01-02 08:22:06 -10:00
parent 691fdc8493
commit c184abf32d

View File

@@ -361,7 +361,11 @@ class ComboBox(urwid.WidgetWrap):
def set_focus(self,index): def set_focus(self,index):
self.focus = index self.focus = index
# API changed between urwid 0.9.8.4 and 0.9.9
try:
self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW)) self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
except AttributeError:
self.cbox._w = SelText(self.list[index]+self.DOWN_ARROW)
if self.overlay: if self.overlay:
self.overlay._listbox.set_focus(index) self.overlay._listbox.set_focus(index)