summaryrefslogtreecommitdiff
path: root/python/vyos/ethtool.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-30 20:24:17 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-30 20:41:23 +0200
commit0b414bcd2930a1469df0a747962f4650d0fb964b (patch)
tree3a8fd4d48ae3403efc0aedc1d71b149479f1c3b5 /python/vyos/ethtool.py
parentee5af5ddc65333c76baa498d6131f69073e39a7e (diff)
downloadvyos-1x-0b414bcd2930a1469df0a747962f4650d0fb964b.tar.gz
vyos-1x-0b414bcd2930a1469df0a747962f4650d0fb964b.zip
vyos.ethtool: T3874: do not throw exception if adapter has issues with autoneg
Instead of throwing an exception when an adapters autoneg capabilities can not be detected, just pretend it does not support autoneg.
Diffstat (limited to 'python/vyos/ethtool.py')
-rw-r--r--python/vyos/ethtool.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index bc95767b1..eb5b0a456 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -45,7 +45,7 @@ class Ethtool:
_ring_buffers = { }
_ring_buffers_max = { }
_driver_name = None
- _auto_negotiation = None
+ _auto_negotiation = False
_flow_control = False
_flow_control_enabled = None
@@ -84,10 +84,6 @@ class Ethtool:
tmp = line.split()[-1]
self._auto_negotiation = bool(tmp == 'on')
- if self._auto_negotiation == None:
- raise ValueError(f'Could not determine auto-negotiation settings '\
- f'for interface {ifname}!')
-
# Now populate features dictionaty
out, err = popen(f'ethtool --show-features {ifname}')
# skip the first line, it only says: "Features for eth0":