mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
some will put it as integer in conf file
This commit is contained in:
parent
5cc19f7037
commit
dabf3395aa
@ -91,13 +91,13 @@ def daemonize(umask):
|
||||
|
||||
def set_owner_process(user,group):
|
||||
if group:
|
||||
if group.isdigit():
|
||||
if group.isdigit() or isinstance(group, int):
|
||||
gid = int(group)
|
||||
else:
|
||||
gid = grp.getgrnam(group).gr_gid
|
||||
os.setgid(gid)
|
||||
if user:
|
||||
if user.isdigit():
|
||||
if user.isdigit() or isinstance(user, int):
|
||||
uid = int(user)
|
||||
else:
|
||||
uid = pwd.getpwnam(user).pw_uid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user