1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00
This commit is contained in:
Peter Bieringer 2025-07-20 12:46:55 +02:00
parent 1704302d54
commit d050096bbb

View file

@ -225,7 +225,12 @@ def user_groups_as_string():
if sys.platform != "win32":
euid = os.geteuid()
egid = os.getegid()
username = pwd.getpwuid(euid)[0]
try:
username = pwd.getpwuid(euid)[0]
except:
# name of user not found
s = "user=(%d) group=(%d)" % (euid, egid)
return s
gids = os.getgrouplist(username, egid)
groups = []
for gid in gids: