test suite reviews and discussions
 help / color / mirror / Atom feed
* [PATCH v1] framework/tester: fix pylama errors
@ 2021-11-24 13:51 Juraj Linkeš
  2021-12-08  8:54 ` [PATCH v2] " Juraj Linkeš
  2022-01-14  7:58 ` [PATCH v1] " Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Juraj Linkeš @ 2021-11-24 13:51 UTC (permalink / raw)
  To: lijuan.tu, ohilyard; +Cc: dts, Juraj Linkeš

Pylama found the following errors:
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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/tester.py b/framework/tester.py
index 9dba4e4d..e204ac6d 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -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)
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] framework/tester: fix pylama errors
  2021-11-24 13:51 [PATCH v1] framework/tester: fix pylama errors Juraj Linkeš
@ 2021-12-08  8:54 ` Juraj Linkeš
  2022-01-14  7:58 ` [PATCH v1] " Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Juraj Linkeš @ 2021-12-08  8:54 UTC (permalink / raw)
  To: lijuan.tu, ohilyard; +Cc: dts, Juraj Linkeš

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(-)

diff --git a/framework/tester.py b/framework/tester.py
index 9dba4e4d..cb3d2015 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -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)
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v1] framework/tester: fix pylama errors
  2021-11-24 13:51 [PATCH v1] framework/tester: fix pylama errors Juraj Linkeš
  2021-12-08  8:54 ` [PATCH v2] " Juraj Linkeš
@ 2022-01-14  7:58 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2022-01-14  7:58 UTC (permalink / raw)
  To: Juraj Linkeš, ohilyard; +Cc: dts

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: 2021年11月24日 21:51
> To: Tu, Lijuan <lijuan.tu@intel.com>; ohilyard@iol.unh.edu
> Cc: dts@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v1] framework/tester: fix pylama errors
> 
> Pylama found the following errors:
> 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>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-14  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 13:51 [PATCH v1] framework/tester: fix pylama errors Juraj Linkeš
2021-12-08  8:54 ` [PATCH v2] " Juraj Linkeš
2022-01-14  7:58 ` [PATCH v1] " Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).