Merge pull request #924 from YunoHost/fix_get_uid_user_create

[fix] uid will be tested as a string
This commit is contained in:
Alexandre Aubin 2020-04-09 13:50:16 +02:00 committed by GitHub
commit 27ffa4a818
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,8 +165,8 @@ def user_create(operation_logger, username, firstname, lastname, mail, password,
operation_logger.start()
# Get random UID/GID
all_uid = {x.pw_uid for x in pwd.getpwall()}
all_gid = {x.gr_gid for x in grp.getgrall()}
all_uid = {str(x.pw_uid) for x in pwd.getpwall()}
all_gid = {str(x.gr_gid) for x in grp.getgrall()}
uid_guid_found = False
while not uid_guid_found: