Commit | Line | Data |
---|---|---|
ae4784af MW |
1 | Fix copied from https://bugs.launchpad.net/wicd/+bug/1432423/comments/1 |
2 | ||
3 | --- wicd-1.7.3/curses/netentry_curses.py 1969-12-31 19:00:00.000000000 -0500 | |
4 | +++ wicd-1.7.3/curses/netentry_curses.py 2015-08-11 23:26:19.999999649 -0400 | |
5 | @@ -538,11 +538,16 @@ | |
6 | self.bitrates = wireless.GetAvailableBitrates() | |
7 | self.bitrates.append('auto') | |
8 | self.bitrate_combo.set_list(self.bitrates) | |
9 | + | |
10 | + # bitrate property is sometimes None | |
11 | + chosen_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate') | |
12 | + if chosen_bitrate not in self.bitrates: | |
13 | + chosen_bitrate = 'auto' | |
14 | + | |
15 | self.bitrate_combo.set_focus( | |
16 | - self.bitrates.index( | |
17 | - wireless.GetWirelessProperty(networkID, 'bitrate') | |
18 | - ) | |
19 | + self.bitrates.index(chosen_bitrate) | |
20 | ) | |
21 | + | |
22 | self.allow_lower_bitrates_chkbox.set_state( | |
23 | to_bool(self.format_entry(networkID, 'allow_lower_bitrates')) | |
24 | ) |