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

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