From e0130e777ead5e9128b58b7fe8c99e4052cff090 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 25 Apr 2019 14:59:41 +0200 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- tests/py/nft-test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/py') 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 -- cgit v1.2.3