[v2] framework/tester: fix pylama errors
Checks
Commit Message
Pylama found the following errors:
framework/tester.py:247: [E] E1136 Value 'self.duts' is unsubscriptable [pylint]
framework/tester.py:259: [E] E1133 Non-iterable value self.duts is used in an iterating context [pylint]
framework/tester.py:348: [E] E1101 Instance of 'Exception' has no 'message' member [pylint]
framework/tester.py:372: [E] E1101 Instance of 'Exception' has no 'message' member [pylint]
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
Lijuan, please add additional people to review if needed.
---
framework/tester.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -85,7 +85,7 @@ class Tester(Crb):
check_crb_python_version(self)
self.bgProcIsRunning = False
- self.duts = None
+ self.duts = []
self.inBg = 0
self.scapyCmds = []
self.bgCmds = []
@@ -345,7 +345,7 @@ class Tester(Crb):
self.send_expect("ifconfig %s up" % itf, "# ")
except Exception as e:
- self.logger.error(" !!! Restore ITF: " + e.message)
+ self.logger.error(f" !!! Restore ITF: {e}")
sleep(2)
@@ -369,7 +369,7 @@ class Tester(Crb):
self.enable_ipv6(itf)
self.send_expect("ifconfig %s up" % itf, "# ")
except Exception as e:
- self.logger.error(" !!! Restore ITF: " + e.message)
+ self.logger.error(f" !!! Restore ITF: {e}")
sleep(2)