mirror of
https://github.com/gryf/wicd.git
synced 2026-01-06 05:44:18 +01:00
Make sure we try each external app in order if selection is set to be automatic.
This commit is contained in:
@@ -194,10 +194,10 @@ class WiredInterface(Interface, wnettools.BaseWiredInterface):
|
||||
except (IOError, ValueError, TypeError):
|
||||
print 'Error checking link using /sys/class/net/%s/carrier' % self.iface
|
||||
|
||||
if self.miitool_cmd and self.link_detect == misc.MIITOOL:
|
||||
return self._mii_get_plugged_in()
|
||||
elif self.ethtool_cmd:
|
||||
if self.ethtool_cmd and self.link_detect in [misc.ETHTOOL, misc.AUTO]:
|
||||
return self._eth_get_plugged_in()
|
||||
elif self.miitool_cmd and self.link_detect in [misc.MIITOOL, misc.AUTO]:
|
||||
return self._mii_get_plugged_in()
|
||||
else:
|
||||
print 'Error: No way of checking for a wired connection. Make ' + \
|
||||
'sure that either mii-tool or ethtool is installed.'
|
||||
|
||||
@@ -191,9 +191,9 @@ class WiredInterface(Interface, wnettools.BaseWiredInterface):
|
||||
|
||||
"""
|
||||
if not self.iface: return False
|
||||
if self.ethtool_cmd and self.link_detect != misc.MIITOOL:
|
||||
if self.ethtool_cmd and self.link_detect in [misc.ETHTOOL, misc.AUTO]:
|
||||
return self._eth_get_plugged_in()
|
||||
elif self.miitool_cmd:
|
||||
elif self.miitool_cmd and self.link_detect in [misc.MIITOOL, misc.AUTO]:
|
||||
return self._mii_get_plugged_in()
|
||||
else:
|
||||
print 'Error: No way of checking for a wired connection. Make \
|
||||
|
||||
Reference in New Issue
Block a user