From b9a0086aac8d710fb69eced37f64710a437874ec Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 6 Jun 2019 18:26:58 -0700 Subject: [PATCH] Fix RuntimeError on Python 3.8. --- lib/ansible/modules/network/dellos9/dellos9_facts.py | 4 ++-- lib/ansible/modules/storage/netapp/na_ontap_quotas.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/dellos9/dellos9_facts.py b/lib/ansible/modules/network/dellos9/dellos9_facts.py index b7abedf5527..5818644430b 100644 --- a/lib/ansible/modules/network/dellos9/dellos9_facts.py +++ b/lib/ansible/modules/network/dellos9/dellos9_facts.py @@ -252,13 +252,13 @@ class Interfaces(FactsBase): data = self.responses[0] interfaces = self.parse_interfaces(data) - for key in interfaces.keys(): + for key in list(interfaces.keys()): if "ManagementEthernet" in key: temp_parsed = interfaces[key] del interfaces[key] interfaces.update(self.parse_mgmt_interfaces(temp_parsed)) - for key in interfaces.keys(): + for key in list(interfaces.keys()): if "Vlan" in key: temp_parsed = interfaces[key] del interfaces[key] diff --git a/lib/ansible/modules/storage/netapp/na_ontap_quotas.py b/lib/ansible/modules/storage/netapp/na_ontap_quotas.py index 7ecb904ed9d..7957331e2ee 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_quotas.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_quotas.py @@ -326,7 +326,7 @@ class NetAppONTAPQuotas(object): elif cd_action == 'delete': self.quota_entry_delete() elif modify_quota is not None: - for key in modify_quota: + for key in list(modify_quota): modify_quota[key.replace("_", "-")] = modify_quota.pop(key) self.quota_entry_modify(modify_quota) if modify_quota_status is not None: