From 08326e447f5681f16c9ddf58b6d7683201072f24 Mon Sep 17 00:00:00 2001 From: imdano <> Date: Sun, 27 Jan 2008 15:32:21 +0000 Subject: [PATCH] Fixed some malformed regular expressions. --- wnettools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wnettools.py b/wnettools.py index 12cc799..ae54579 100644 --- a/wnettools.py +++ b/wnettools.py @@ -267,14 +267,14 @@ class WiredInterface(Interface): self.Up() time.sleep(6) tool_data = misc.Run(link_tool + ' ' + self.iface, True) - if misc.RunRegex(re.compile('(Operation not supported)|\ - (ethtool: command not found)', re.I), + if misc.RunRegex(re.compile('(Operation not supported|\ + ethtool: command not found)', re.I), tool_data) is not None: print "ethtool check failed, falling back to mii-tool" link_tool = 'mii-tool' 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: return True else: