Signed-off-by: Máté Eckl <[email protected]>
---
tests/py/nft-test.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index b536e9c..edc0b4b 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -161,15 +161,13 @@ def color_differences(rule, other, color):
def print_differences_warning(filename, lineno, rule1, rule2, cmd):
colored_rule1 = color_differences(rule1, rule2, Colors.YELLOW)
colored_rule2 = color_differences(rule2, rule1, Colors.YELLOW)
- reason = "'" + colored_rule1 + "' mismatches '" + colored_rule2 + "'"
- print filename + ": " + Colors.YELLOW + "WARNING: " + Colors.ENDC + \
- "line: " + str(lineno + 1) + ": '" + cmd + "': " + reason
+ reason = "'%s': '%s' mismatches '%s'" % (cmd, colored_rule1, colored_rule2)
+ print_warning(reason, filename, lineno)
def print_differences_error(filename, lineno, cmd):
- reason = "Listing is broken."
- print filename + ": " + Colors.RED + "ERROR: " + Colors.ENDC + "line: " + \
- str(lineno + 1) + ": '" + cmd + "': " + reason
+ reason = "'%s': Listing is broken." % cmd
+ print_error(reason, filename, lineno)
def table_exist(table, filename, lineno):
--
ecklm
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html