summaryrefslogtreecommitdiff
path: root/extra/source/wicd/curses_bitrate_fix.patch
blob: 1efa0c8413ba30a28b08c95a5ae54796469a89e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- curses/netentry_curses.py   2015-02-15 18:29:05.000000000 +0100
+++ curses/netentry_curses.py   2015-02-15 18:31:24.000000000 +0100
@@ -538,11 +538,12 @@
         self.bitrates = wireless.GetAvailableBitrates()
         self.bitrates.append('auto')
         self.bitrate_combo.set_list(self.bitrates)
-        self.bitrate_combo.set_focus(
-            self.bitrates.index(
-                wireless.GetWirelessProperty(networkID, 'bitrate')
+        if wireless.GetWirelessProperty(networkID, 'bitrate'):
+            self.bitrate_combo.set_focus(
+                self.bitrates.index(
+                    wireless.GetWirelessProperty(networkID, 'bitrate')
+                )
             )
-        )
         self.allow_lower_bitrates_chkbox.set_state(
             to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))
         )