summaryrefslogtreecommitdiff
path: root/python/vyos
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:54 +0200
commit21499b23a1b711aafe9640b898d06b95c70988b9 (patch)
tree063fa69f58e95f325ea7d028b5feab7e89fe31b0 /python/vyos
parent2a79df6398ea3faba1a148dc9fdf90fecdf750c7 (diff)
downloadvyos-1x-21499b23a1b711aafe9640b898d06b95c70988b9.tar.gz
vyos-1x-21499b23a1b711aafe9640b898d06b95c70988b9.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. (cherry picked from commit 0b414bcd2930a1469df0a747962f4650d0fb964b)
Diffstat (limited to 'python/vyos')
-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":