summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-10-24 21:27:28 +0200
committerChristian Poessinger <christian@poessinger.com>2021-10-24 21:27:28 +0200
commit8cf5a4f023c5459cad4c84e93f73a9ddd69be81a (patch)
treea0c6114561dbb2b2475d8eef85fc445e34e7c2c0
parentaeff049aea37115a7bbe52cd0da4d987fbccde82 (diff)
downloadvyos-1x-8cf5a4f023c5459cad4c84e93f73a9ddd69be81a.tar.gz
vyos-1x-8cf5a4f023c5459cad4c84e93f73a9ddd69be81a.zip
vyos.ethtool: T3935: relax __init__() when driver name is not detected
In addition to commit 0b414bcd ("vyos.ethtool: T3874: do not throw exception if adapter has issues with autoneg") we should also not care too strict when locating the driver name. This might cause false positives.
-rw-r--r--python/vyos/ethtool.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index eb5b0a456..e45b0f041 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -56,9 +56,6 @@ class Ethtool:
link = os.readlink(sysfs_file)
self._driver_name = os.path.basename(link)
- if not self._driver_name:
- raise ValueError(f'Could not determine driver for interface {ifname}!')
-
# Build a dictinary of supported link-speed and dupley settings.
out, err = popen(f'ethtool {ifname}')
reading = False