summaryrefslogtreecommitdiffstats
path: root/tests/py/nft-test.py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-04-25 14:59:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-04-30 14:20:57 +0200
commite0130e777ead5e9128b58b7fe8c99e4052cff090 (patch)
tree69678034faacb14bd8a740e840f00a9e1b10b7d3 /tests/py/nft-test.py
parentcf6f35371aa73cdfae2fe1290ffacb4ec9f93741 (diff)
tests/py: Fix error messages in chain_delete()
Adding string and chain object is an illegal operation in Python. Instead concatenate with cmd string since that contains all required information already. Fixes: 820fd08b5f1d4 ("tests/py: Review print statements in nft-test.py") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/nft-test.py')
-rwxr-xr-xtests/py/nft-test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index 5c7e28a0..1c0afd0e 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -310,14 +310,14 @@ def chain_delete(chain, table, filename=None, lineno=None):
cmd = "flush chain %s %s" % (table, chain)
ret = execute_cmd(cmd, filename, lineno)
if ret != 0:
- reason = "I cannot flush this chain " + chain
+ reason = "I cannot " + cmd
print_error(reason, filename, lineno)
return -1
cmd = "delete chain %s %s" % (table, chain)
ret = execute_cmd(cmd, filename, lineno)
if ret != 0:
- reason = cmd + "I cannot delete this chain " + chain
+ reason = "I cannot " + cmd
print_error(reason, filename, lineno)
return -1