unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 1809b7217d47cb83f0f19e19d0e28d0c1f7579d0 966 bytes (raw)
name: patches/wicd-bitrate-none-fix.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
Fix copied from https://bugs.launchpad.net/wicd/+bug/1432423/comments/1

--- wicd-1.7.3/curses/netentry_curses.py	1969-12-31 19:00:00.000000000 -0500
+++ wicd-1.7.3/curses/netentry_curses.py	2015-08-11 23:26:19.999999649 -0400
@@ -538,11 +538,16 @@
         self.bitrates = wireless.GetAvailableBitrates()
         self.bitrates.append('auto')
         self.bitrate_combo.set_list(self.bitrates)
+
+        # bitrate property is sometimes None
+        chosen_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate')
+        if chosen_bitrate not in self.bitrates:
+            chosen_bitrate = 'auto'
+
         self.bitrate_combo.set_focus(
-            self.bitrates.index(
-                wireless.GetWirelessProperty(networkID, 'bitrate')
-            )
+            self.bitrates.index(chosen_bitrate)
         )
+
         self.allow_lower_bitrates_chkbox.set_state(
             to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))
         )

debug log:

solving 1809b7217d47cb83f0f19e19d0e28d0c1f7579d0 ...
found 1809b7217d47cb83f0f19e19d0e28d0c1f7579d0 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).