fix util.set_owner_process

Python 2.x is not supported anymore, let's remove this extra feature.

fix #3212
This commit is contained in:
benoitc 2024-08-11 09:50:38 +02:00
parent 5aeb0652e1
commit 7268a61099

View File

@ -147,10 +147,6 @@ def set_owner_process(uid, gid, initgroups=False):
except KeyError:
initgroups = False
# versions of python < 2.6.2 don't manage unsigned int for
# groups like on osx or fedora
gid = abs(gid) & 0x7FFFFFFF
if initgroups:
os.initgroups(username, gid)
elif gid != os.getgid():