diff options
author | Florian Westphal <fw@strlen.de> | 2019-08-16 12:32:19 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2019-08-16 12:32:19 +0200 |
commit | 7ff3e2b18305af07d322eef26111aa7ec4bde79d (patch) | |
tree | 3e18f0ebe9511fe53c661e67f479ea019841dc5e /tests | |
parent | e33480a494001501f1a8ec080a4941b25336831b (diff) |
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 <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/py/nft-test.py | 1 |
1 files changed, 1 insertions, 0 deletions
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): |