aboutsummaryrefslogtreecommitdiffstats
path: root/extras/vpp_config/vpplib/VPPUtil.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-04-30 20:57:04 -0700
committerDamjan Marion <dmarion@me.com>2019-05-01 17:23:35 +0000
commitb11c288f11bb04cb48c50088279546085db8bc27 (patch)
tree1a535078db39bed74e0e88517d1b5047aab62446 /extras/vpp_config/vpplib/VPPUtil.py
parentb31c0ce2194ddb198320e91f42973e35a1ab4619 (diff)
vpp_config: correct usage of 'is' for equality tests.
Change-Id: I30b1cdb2930560d7c40c1bde098fd21f16a17683 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'extras/vpp_config/vpplib/VPPUtil.py')
-rw-r--r--extras/vpp_config/vpplib/VPPUtil.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py
index 2cbaa2d0aaf..5ed46f2452e 100644
--- a/extras/vpp_config/vpplib/VPPUtil.py
+++ b/extras/vpp_config/vpplib/VPPUtil.py
@@ -402,18 +402,18 @@ class VPPUtil(object):
return interfaces
lines = stdout.split('\n')
- if len(lines[0]) is not 0:
+ if len(lines[0]) != 0:
if lines[0].split(' ')[0] == 'FileNotFoundError':
return interfaces
name = ''
for line in lines:
- if len(line) is 0:
+ if len(line) == 0:
continue
# If the first character is not whitespace
# create a new interface
- if len(re.findall(r'\s', line[0])) is 0:
+ if len(re.findall(r'\s', line[0])) == 0:
spl = line.split()
name = spl[0]
if name == 'local0':
@@ -444,17 +444,17 @@ class VPPUtil(object):
return interfaces
lines = stdout.split('\n')
- if len(lines[0]) is not 0:
+ if len(lines[0]) != 0:
if lines[0].split(' ')[0] == 'FileNotFoundError':
return interfaces
for line in lines:
- if len(line) is 0:
+ if len(line) == 0:
continue
# If the first character is not whitespace
# create a new interface
- if len(re.findall(r'\s', line[0])) is 0:
+ if len(re.findall(r'\s', line[0])) == 0:
spl = line.split()
name = spl[0]
interfaces[name] = {}
@@ -731,12 +731,12 @@ class VPPUtil(object):
return version
lines = stdout.split('\n')
- if len(lines[0]) is not 0:
+ if len(lines[0]) != 0:
if lines[0].split(' ')[0] == 'FileNotFoundError':
return version
for line in lines:
- if len(line) is 0:
+ if len(line) == 0:
continue
dct = line.split(':')
version[dct[0]] = dct[1].lstrip(' ')