From 10d4fb7ea859cb07240b09acdb805f23782b3dc9 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Thu, 22 Jun 2017 13:40:38 +0200 Subject: [PATCH] py3: test_location_plugin: fix iteration over changed dict In py3 dict.items() doesn't return list so we must create a list to avoid changing dictionary over iteration. https://pagure.io/freeipa/issue/4985 Reviewed-By: Stanislav Laznicka --- .travis.yml | 2 +- ipatests/test_xmlrpc/tracker/server_plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d09d079b0..3cdcd23a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,7 @@ env: TESTS_TO_RUN="test_cmdline test_ipalib test_pkcs10 + test_xmlrpc/test_location_plugin.py test_xmlrpc/test_nesting.py test_xmlrpc/test_netgroup_plugin.py test_xmlrpc/test_old_permission_plugin.py @@ -112,7 +113,6 @@ env: # test_ipaserver/test_version_comparison.py ## test_ipaserver ## test_xmlrpc/test_[l-z]*.py - # test_xmlrpc/test_location_plugin.py # test_xmlrpc/test_range_plugin.py # test_xmlrpc/test_trust_plugin.py # test_xmlrpc/test_vault_plugin.py diff --git a/ipatests/test_xmlrpc/tracker/server_plugin.py b/ipatests/test_xmlrpc/tracker/server_plugin.py index 0a78cc9ac..872aec99d 100644 --- a/ipatests/test_xmlrpc/tracker/server_plugin.py +++ b/ipatests/test_xmlrpc/tracker/server_plugin.py @@ -124,7 +124,7 @@ class ServerTracker(Tracker): result = command() self.attrs.update(updates) self.attrs.update(expected_updates) - for key, value in self.attrs.items(): + for key, value in list(self.attrs.items()): if value is None: del self.attrs[key]