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

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