summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2022-02-12 16:58:29 +0000
committerFlorian Westphal <fw@strlen.de>2022-02-13 22:20:17 +0100
commit7a006c7d5c58ef93f1606b56d4c9589827c6dc27 (patch)
tree4e870caa6fd0fa732b4cfd55b4f9df27904a4d60
parentb7f15b42d82a6b1b493f07b79cebab4c6e09aa9f (diff)
tests: iptables-test: rename variable
"Splitted" hasn't been current since the seventeenth century. Replace it with "tokens". Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de>
-rwxr-xr-xiptables-test.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/iptables-test.py b/iptables-test.py
index b49afcab..91c77e3d 100755
--- a/iptables-test.py
+++ b/iptables-test.py
@@ -107,20 +107,20 @@ def run_test(iptables, rule, rule_save, res, filename, lineno, netns):
return -1
matching = 0
- splitted = iptables.split(" ")
- if len(splitted) == 2:
- if splitted[1] == '-4':
+ tokens = iptables.split(" ")
+ if len(tokens) == 2:
+ if tokens[1] == '-4':
command = IPTABLES_SAVE
- elif splitted[1] == '-6':
+ elif tokens[1] == '-6':
command = IP6TABLES_SAVE
- elif len(splitted) == 1:
- if splitted[0] == IPTABLES:
+ elif len(tokens) == 1:
+ if tokens[0] == IPTABLES:
command = IPTABLES_SAVE
- elif splitted[0] == IP6TABLES:
+ elif tokens[0] == IP6TABLES:
command = IP6TABLES_SAVE
- elif splitted[0] == ARPTABLES:
+ elif tokens[0] == ARPTABLES:
command = ARPTABLES_SAVE
- elif splitted[0] == EBTABLES:
+ elif tokens[0] == EBTABLES:
command = EBTABLES_SAVE
command = EXECUTABLE + " " + command
@@ -128,7 +128,7 @@ def run_test(iptables, rule, rule_save, res, filename, lineno, netns):
if netns:
command = "ip netns exec ____iptables-container-test " + command
- args = splitted[1:]
+ args = tokens[1:]
proc = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)