Skip to content

Commit ac523dd

Browse files
committed
fix a potential py3 iterate with inline modification issue up front, even if the function in question should not be needed anymore.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6140 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 6de864a commit ac523dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mig/shared/useradm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,9 @@ def fix_userdb_keys(
22112211
unlock_user_db(flock)
22122212
raise Exception('Failed to load user DB: %s' % err)
22132213

2214-
for (client_id, user) in user_db.items():
2214+
# NOTE: force list copy here as we delete inline below
2215+
for client_id in list(user_db):
2216+
user = user_db[client_id]
22152217
fill_distinguished_name(user)
22162218
old_id = client_id
22172219
new_id = user['distinguished_name']

0 commit comments

Comments
 (0)