mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
This commit is contained in:
parent
1704302d54
commit
d050096bbb
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue