From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [nft PATCH 1/4] tests: json_echo: Fix for Python3
Date: Thu, 6 Feb 2020 01:58:48 +0100 [thread overview]
Message-ID: <20200206005851.28962-2-phil@nwl.cc> (raw)
In-Reply-To: <20200206005851.28962-1-phil@nwl.cc>
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 <phil@nwl.cc>
---
tests/json_echo/run-test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/json_echo/run-test.py b/tests/json_echo/run-test.py
index a636d5f247702..fa7d69ab75645 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
--
2.24.1
next prev parent reply other threads:[~2020-02-06 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 0:58 [nft PATCH 0/4] Extend testsuites to run against installed binaries Phil Sutter
2020-02-06 0:58 ` Phil Sutter [this message]
2020-02-06 0:58 ` [nft PATCH 2/4] tests: json_echo: Support testing host binaries Phil Sutter
2020-02-06 0:58 ` [nft PATCH 3/4] tests: monitor: Support testing host's nft binary Phil Sutter
2020-02-06 0:58 ` [nft PATCH 4/4] tests: py: Support testing host binaries Phil Sutter
2020-02-07 11:25 ` [nft PATCH 0/4] Extend testsuites to run against installed binaries Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200206005851.28962-2-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).