summaryrefslogtreecommitdiff
path: root/extra/source/wicd/wicd.netentry_curses.py.save.settings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/wicd/wicd.netentry_curses.py.save.settings.patch')
-rw-r--r--extra/source/wicd/wicd.netentry_curses.py.save.settings.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/extra/source/wicd/wicd.netentry_curses.py.save.settings.patch b/extra/source/wicd/wicd.netentry_curses.py.save.settings.patch
new file mode 100644
index 00000000..512a467a
--- /dev/null
+++ b/extra/source/wicd/wicd.netentry_curses.py.save.settings.patch
@@ -0,0 +1,31 @@
+--- ./curses/netentry_curses.py.orig 2018-03-15 12:02:07.569646094 -0500
++++ ./curses/netentry_curses.py 2018-03-15 12:03:15.711650457 -0500
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python2
+ """
+ netentry_curses -- everyone's favorite networks settings dialogs... in text
+ form!
+@@ -538,12 +538,16 @@
+ self.bitrates = wireless.GetAvailableBitrates()
+ self.bitrates.append('auto')
+ self.bitrate_combo.set_list(self.bitrates)
+- if wireless.GetWirelessProperty(networkID, 'bitrate'):
+- self.bitrate_combo.set_focus(
+- self.bitrates.index(
+- wireless.GetWirelessProperty(networkID, 'bitrate')
+- )
+- )
++
++ # 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(chosen_bitrate)
++ )
++
+ self.allow_lower_bitrates_chkbox.set_state(
+ to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))
+ )