mirror of
https://github.com/gryf/wicd.git
synced 2026-03-18 07:43:44 +01:00
Refactor wnettools/backend code so that most external tool functionality exists in wnettools, and it just inherited by the external backends. This simplifies creating new backends that just override selected methods.
Rewrite encryption template parsing code to allow blank entries (though the GUI still doesn't), and be more permissive of slightly incorrect formatting. Fix bug in wicd-monitor error handling code.
This commit is contained in:
@@ -434,7 +434,7 @@ class TrayIcon(object):
|
||||
""" Determines which image to use for the wireless entries. """
|
||||
def fix_strength(val, default):
|
||||
""" Assigns given strength to a default value if needed. """
|
||||
return val is not None and int(val) or default
|
||||
return val and int(val) or default
|
||||
|
||||
def get_prop(prop):
|
||||
return wireless.GetWirelessProperty(net_id, prop)
|
||||
|
||||
Reference in New Issue
Block a user