test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: lijuan.tu@intel.com, ohilyard@iol.unh.edu
Cc: dts@dpdk.org, "Juraj Linkeš" <juraj.linkes@pantheon.tech>
Subject: [PATCH v2] framework/tester: fix pylama errors
Date: Wed,  8 Dec 2021 09:54:59 +0100	[thread overview]
Message-ID: <1638953699-8512-1-git-send-email-juraj.linkes@pantheon.tech> (raw)
In-Reply-To: <1637761862-4247-1-git-send-email-juraj.linkes@pantheon.tech>

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


  reply	other threads:[~2021-12-08  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 13:51 [PATCH v1] " Juraj Linkeš
2021-12-08  8:54 ` Juraj Linkeš [this message]
2022-01-14  7:58 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1638953699-8512-1-git-send-email-juraj.linkes@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=ohilyard@iol.unh.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).