mirror of
https://github.com/gryf/wicd.git
synced 2026-02-28 13:25:50 +01:00
Fixed some malformed regular expressions.
This commit is contained in:
@@ -267,14 +267,14 @@ class WiredInterface(Interface):
|
|||||||
self.Up()
|
self.Up()
|
||||||
time.sleep(6)
|
time.sleep(6)
|
||||||
tool_data = misc.Run(link_tool + ' ' + self.iface, True)
|
tool_data = misc.Run(link_tool + ' ' + self.iface, True)
|
||||||
if misc.RunRegex(re.compile('(Operation not supported)|\
|
if misc.RunRegex(re.compile('(Operation not supported|\
|
||||||
(ethtool: command not found)', re.I),
|
ethtool: command not found)', re.I),
|
||||||
tool_data) is not None:
|
tool_data) is not None:
|
||||||
print "ethtool check failed, falling back to mii-tool"
|
print "ethtool check failed, falling back to mii-tool"
|
||||||
link_tool = 'mii-tool'
|
link_tool = 'mii-tool'
|
||||||
|
|
||||||
tool_data = misc.Run(link_tool + ' ' + self.iface, True)
|
tool_data = misc.Run(link_tool + ' ' + self.iface, True)
|
||||||
if misc.RunRegex(re.compile('(Link detected: yes)|(link ok)',
|
if misc.RunRegex(re.compile('(Link detected: yes|link ok)',
|
||||||
re.I | re.M | re.S), tool_data) is not None:
|
re.I | re.M | re.S), tool_data) is not None:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user