[stable-2.8] Fix RuntimeError on Python 3.8. (#57520)

* [stable-2.8] Fix RuntimeError on Python 3.8.
(cherry picked from commit b9a0086aac)

Co-authored-by: Matt Clay <matt@mystile.com>

* Add changelog fragment.
pull/57672/head
Matt Clay 7 years ago committed by GitHub
parent 208bb48942
commit 485ebaa799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- dellos9_facts - Fix RuntimeError on Python 3.8.
- na_ontap_quotas - Fix RuntimeError on Python 3.8.

@ -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]

@ -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:

Loading…
Cancel
Save