From: Ondrej Lichtner <olichtne(a)redhat.com>
Log the error and return None value pair, but don't raise an exception
that halts the rest of the recipe.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Devices/Device.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lnst/Devices/Device.py b/lnst/Devices/Device.py
index b78b295..9587a88 100644
--- a/lnst/Devices/Device.py
+++ b/lnst/Devices/Device.py
@@ -650,8 +650,9 @@ class Device(object):
try:
res = exec_cmd("ethtool -c %s" % self.name)
except:
- raise DeviceError("Could not read coalescence values of "
- "%s." % self.name)
+ logging.debug("Could not read coalescence values of %s." %
self.name)
+ return (None, None)
+
regex = "Adaptive RX: (on|off) TX: (on|off)"
try:
res = re.search(regex, res[0]).groups()
--
2.21.0