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 <slaznick@redhat.com>
This commit is contained in:
Martin Basti
2017-06-23 14:45:05 +02:00
parent 8116a7b450
commit 10d4fb7ea8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
@@ -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]