Package: wicd / 1.7.4+tb2-5~deb9u1

35-fix_ValueError_None_is_not_in_list.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: Fix "ValueError: None is not in list" error
 This fixes the following error when accessing the network properties
 of any wireless network in wicd-curses:
 .
 Traceback (most recent call last):
   File "/usr/share/wicd/curses/wicd-curses.py", line 1146, in call_update_ui
     self.update_ui(True)
   File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
     return func(*args, **kargs)
   File "/usr/share/wicd/curses/wicd-curses.py", line 1159, in update_ui
     self.handle_keys(input_data)
   File "/usr/share/wicd/curses/wicd-curses.py", line 1037, in handle_keys
     self.diag = WirelessSettingsDialog(pos, self.frame)
   File "/usr/share/wicd/curses/netentry_curses.py", line 503, in __init__
     self.set_values()
   File "/usr/share/wicd/curses/netentry_curses.py", line 543, in set_values
     wireless.GetWirelessProperty(networkID, 'bitrate')
 ValueError: None is not in list
Origin: https://github.com/voidlinux/void-packages/commit/220de599ad3ecba14423289209a3e4e031037edf
Bug-Voidlinux: https://github.com/voidlinux/void-packages/issues/954
Author: Duncan Overbruck <mail@duncano.de>
Reviewed-By: Axel Beckert <abe@debian.org>
Last-Update: 2016-01-17

Index: wicd/curses/netentry_curses.py
===================================================================
--- wicd.orig/curses/netentry_curses.py	2015-10-04 23:41:35.737160585 +0200
+++ wicd/curses/netentry_curses.py	2016-01-17 17:58:41.302893854 +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'))
         )