[python] replace python2 iteritems by python3 items

source https://wiki.python.org/moin/Python3.0\#Built-In_Changes
This commit is contained in:
Julien Mailleret 2019-10-04 07:41:34 +02:00
parent aff478f52f
commit cc0abcfc01
No known key found for this signature in database
GPG key ID: F065093271C8DE71

View file

@ -23,7 +23,7 @@ def array_to_str(values=[],separator=','):
def extract_role_users(users={},exclude_users=[]): def extract_role_users(users={},exclude_users=[]):
role_users=[] role_users=[]
for user,details in users.iteritems(): for user,details in users.items():
if user not in exclude_users and "roles" in details: if user not in exclude_users and "roles" in details:
for role in details["roles"]: for role in details["roles"]:
role_users.append(role+":"+user) role_users.append(role+":"+user)