1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nios_member: fix nios api member_normalize error with python 3 (#1527) (#1534)

* nios_member: fix nios api member_normalize error with python 3

Force a copy of the key to allow change during iteration.

* Update - add changelog fragment

* Update - add changelog fragment

* Update changelogs/fragments/1527-fix-nios-api-member-normalize.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c63f3f9956)

Co-authored-by: neatherweb <35084494+neatherweb@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2020-12-23 08:49:29 +01:00 committed by GitHub
parent 34ab07865f
commit 29992f1fbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- nios_member - fix Python 3 compatibility with nios api ``member_normalize`` function (https://github.com/ansible-collections/community.general/issues/1526).

View file

@ -144,7 +144,7 @@ def member_normalize(member_spec):
'pre_provisioning', 'network_setting', 'v6_network_setting',
'ha_port_setting', 'lan_port_setting', 'lan2_physical_setting',
'lan_ha_port_setting', 'mgmt_network_setting', 'v6_mgmt_network_setting']
for key in member_spec.keys():
for key in list(member_spec.keys()):
if key in member_elements and member_spec[key] is not None:
member_spec[key] = member_spec[key][0]
if isinstance(member_spec[key], dict):