Blame SOURCES/0011-tests-json_echo-Fix-for-Python3.patch

911625
From 04d0d2e685063d422ce73b67eb01d4803100d379 Mon Sep 17 00:00:00 2001
911625
From: Phil Sutter <psutter@redhat.com>
911625
Date: Wed, 12 Feb 2020 22:35:27 +0100
911625
Subject: [PATCH] tests: json_echo: Fix for Python3
911625
911625
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1754047
911625
Upstream Status: nftables commit 582f142b1578b
911625
911625
commit 582f142b1578b6036707242bfe874bcefc002ac2
911625
Author: Phil Sutter <phil@nwl.cc>
911625
Date:   Thu Feb 6 01:21:30 2020 +0100
911625
911625
    tests: json_echo: Fix for Python3
911625
911625
    The keys() method returns an object which does not support indexing, so
911625
    convert it to a list prior to doing so.
911625
911625
    Fixes: a35e3a0cdc63a ("tests: json_echo: convert to py3")
911625
    Signed-off-by: Phil Sutter <phil@nwl.cc>
911625
---
911625
 tests/json_echo/run-test.py | 2 +-
911625
 1 file changed, 1 insertion(+), 1 deletion(-)
911625
911625
diff --git a/tests/json_echo/run-test.py b/tests/json_echo/run-test.py
911625
index a636d5f..fa7d69a 100755
911625
--- a/tests/json_echo/run-test.py
911625
+++ b/tests/json_echo/run-test.py
911625
@@ -119,7 +119,7 @@ def get_handle(output, search):
911625
             else:
911625
                 data = item
911625
 
911625
-            k = search.keys()[0]
911625
+            k = list(search.keys())[0]
911625
 
911625
             if not k in data:
911625
                 continue
911625
-- 
8ff5ad
2.31.1
911625