From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B34CCC35247 for ; Thu, 6 Feb 2020 00:58:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 916F820658 for ; Thu, 6 Feb 2020 00:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727572AbgBFA66 (ORCPT ); Wed, 5 Feb 2020 19:58:58 -0500 Received: from orbyte.nwl.cc ([151.80.46.58]:47692 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727149AbgBFA66 (ORCPT ); Wed, 5 Feb 2020 19:58:58 -0500 Received: from localhost ([::1]:60782 helo=tatos) by orbyte.nwl.cc with esmtp (Exim 4.91) (envelope-from ) id 1izVVQ-0000lU-IR; Thu, 06 Feb 2020 01:58:56 +0100 From: Phil Sutter To: Pablo Neira Ayuso 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 Message-Id: <20200206005851.28962-2-phil@nwl.cc> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200206005851.28962-1-phil@nwl.cc> References: <20200206005851.28962-1-phil@nwl.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org 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 --- 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