aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/NATUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/NATUtil.py')
-rw-r--r--resources/libraries/python/NATUtil.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py
index ab97e05dcc..e08a6daf82 100644
--- a/resources/libraries/python/NATUtil.py
+++ b/resources/libraries/python/NATUtil.py
@@ -197,9 +197,9 @@ class NATUtil(object):
items = line.split(" ")
while "" in items:
items.remove("")
- if len(items) == 0:
+ if not items:
continue
- elif len(items) == 4:
+ if len(items) == 4:
# no ports were returned
data.append({
"local_address": items[0],
@@ -246,9 +246,9 @@ class NATUtil(object):
for trash in ("", "vat#"):
while trash in items:
items.remove(trash)
- if len(items) == 0:
+ if not items:
continue
- elif len(items) == 3:
+ if len(items) == 3:
data.append({
# items[0] is the table header - "sw_if_index"
"sw_if_index": items[1],