Merge ~timur-adamow/wicd:fix-1184629 into wicd:master

Proposed by Timur
Status: Needs review
Proposed branch: ~timur-adamow/wicd:fix-1184629
Merge into: wicd:master
Diff against target: 19 lines (+3/-5)
1 file modified
curses/netentry_curses.py (+3/-5)
Reviewer Review Type Date Requested Status
Wicd-devel Pending
Review via email: mp+373785@code.launchpad.net

Commit message

Description of the change

Due to the bug #1184629, wicd-curses could crash after trying to find the index of the current bitrate and use it in a bitrate combobox. With this fix, wicd-curses will not attempt to select current bitrate if there is no current bitrate.

To post a comment you must log in.

Unmerged commits

03d25af... by Timur Adamov <email address hidden>

Fix bug #1184629

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/curses/netentry_curses.py b/curses/netentry_curses.py
index 1803a16..b849afe 100644
--- a/curses/netentry_curses.py
+++ b/curses/netentry_curses.py
@@ -538,11 +538,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
538 self.bitrates = wireless.GetAvailableBitrates()538 self.bitrates = wireless.GetAvailableBitrates()
539 self.bitrates.append('auto')539 self.bitrates.append('auto')
540 self.bitrate_combo.set_list(self.bitrates)540 self.bitrate_combo.set_list(self.bitrates)
541 self.bitrate_combo.set_focus(541 network_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate')
542 self.bitrates.index(542 if (network_bitrate is not None):
543 wireless.GetWirelessProperty(networkID, 'bitrate')543 self.bitrate_combo.set_focus(self.bitrates.index(network_bitrate))
544 )
545 )
546 self.allow_lower_bitrates_chkbox.set_state(544 self.allow_lower_bitrates_chkbox.set_state(
547 to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))545 to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))
548 )546 )

Subscribers

People subscribed via source and target branches

to all changes: