[v1] framework/tester: fix pylama errors

Message ID 1637761862-4247-1-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Accepted
Headers
Series [v1] framework/tester: fix pylama errors |

Checks

Context Check Description
ci/Intel-dts-suite-test fail Testing issues

Commit Message

Juraj Linkeš Nov. 24, 2021, 1:51 p.m. UTC
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(-)
  

Comments

Tu, Lijuan Jan. 14, 2022, 7:58 a.m. UTC | #1
> -----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
  

Patch

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)