From 4b4bc55614cdb03b5758ac08fa01510a6c5d7e49 Mon Sep 17 00:00:00 2001 From: imdano <> Date: Sun, 27 Jan 2008 15:36:00 +0000 Subject: [PATCH] Got rid of extra call to ethtool that should only be done if using mii-tool fallback. --- wnettools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wnettools.py b/wnettools.py index ae54579..275e927 100644 --- a/wnettools.py +++ b/wnettools.py @@ -272,8 +272,8 @@ class WiredInterface(Interface): 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) + tool_data = misc.Run(link_tool + ' ' + self.iface, True) + if misc.RunRegex(re.compile('(Link detected: yes|link ok)', re.I | re.M | re.S), tool_data) is not None: return True