aboutsummaryrefslogtreecommitdiffstats
path: root/test/vcpe/vcpecommon.py
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-05 13:21:59 +0100
committerMarco Platania <platania@research.att.com>2020-03-05 15:27:02 +0000
commit23f22e8e8ca50c862d1cece31a0a87050685cdd7 (patch)
treec2b8c3b79ecc4efeb84e5ccd1a5e86f5addd7fa5 /test/vcpe/vcpecommon.py
parent37fe1c2e88838760a733fbf1129067685ad7a6ea (diff)
Fix Python linting issues in Python scripts
Fixed pylint issues for categories len-as-condition, using-constant-test, undefined-variable and reimported. Change-Id: Idad710958c3ca0ac6da78fb4709da03e5f079b34 Issue-ID: INT-1427 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/vcpe/vcpecommon.py')
-rwxr-xr-xtest/vcpe/vcpecommon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py
index 8bc5ef147..971082c80 100755
--- a/test/vcpe/vcpecommon.py
+++ b/test/vcpe/vcpecommon.py
@@ -520,7 +520,7 @@ class VcpeCommon:
nova = openstackclient.Client(2, self.cloud['--os-username'], self.cloud['--os-password'], self.cloud['--os-tenant-id'], self.cloud['--os-auth-url'])
for i in nova.servers.list():
if i.name == vm:
- for k, v in i.networks.items():
+ for k, v in i.networks.items(): # pylint: disable=W0612
for ip in v:
if IPAddress(ip) in subnet:
return ip
@@ -717,7 +717,7 @@ class VcpeCommon:
url = self.vpp_inf_url.format(ip) + '/interface/' + inf
requests.delete(url, headers=self.vpp_api_headers, auth=self.vpp_api_userpass)
- if len(self.get_vxlan_interfaces(ip)) > 0:
+ if self.get_vxlan_interfaces(ip):
self.logger.error("Error deleting VxLAN from {0}, try to restart the VM, IP is {1}.".format(host, ip))
return False