From: Phil Sutter Date: Thu, 6 Feb 2020 00:21:30 +0000 (+0100) Subject: tests: json_echo: Fix for Python3 X-Git-Tag: v0.9.4~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=582f142b1578b6036707242bfe874bcefc002ac2;p=thirdparty%2Fnftables.git tests: json_echo: Fix for Python3 The keys() method returns an object which does not support indexing, so convert it to a list prior to doing so. Fixes: a35e3a0cdc63a ("tests: json_echo: convert to py3") Signed-off-by: Phil Sutter --- diff --git a/tests/json_echo/run-test.py b/tests/json_echo/run-test.py index a636d5f2..fa7d69ab 100755 --- a/tests/json_echo/run-test.py +++ b/tests/json_echo/run-test.py @@ -119,7 +119,7 @@ def get_handle(output, search): else: data = item - k = search.keys()[0] + k = list(search.keys())[0] if not k in data: continue