From 7ff3e2b18305af07d322eef26111aa7ec4bde79d Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 16 Aug 2019 12:32:19 +0200 Subject: tests: make sure i is defined The test script can die in case there are severe problems, such as rlen being 0 -- in that case i is undefined and script evaluation is aborted. Found during nft development, no existing test case shows this problem. Signed-off-by: Florian Westphal --- tests/py/nft-test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index 7f424cf1..bc0849e0 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -138,6 +138,7 @@ def color_differences(rule, other, color): rlen = len(rule) olen = len(other) out = "" + i = 0 # find equal part at start for i in range(rlen): -- cgit v1.2.3