Skip to content

Commit 67d16f4

Browse files
committed
don't change dict during iteration
1 parent bc6e403 commit 67d16f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/usersdb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ def expand_users(self):
215215
# 1- Check for extra keys that dont translate to ansible user module
216216
if self.extract_extra_keys:
217217
extra_user_data = None
218-
for dic_key in user_options.keys():
218+
user_options_keys = list(user_options.keys())
219+
for dic_key in user_options_keys:
219220
if dic_key not in USERVALUES:
220221
# Add user and state
221222
if not extra_user_data:

0 commit comments

Comments
 (0)