1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Fixed ticket for metapools & fixed get interfaces list for python > 3.2 (as is the case)

This commit is contained in:
Adolfo Gómez García 2021-07-19 13:25:43 +02:00
parent 693d14cd81
commit d38347c534
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ def _getInterfaces() -> typing.List[str]:
0x8912, # SIOCGIFCONF
struct.pack(str('iL'), space, names.buffer_info()[0])
))[0]
namestr = names.tostring()
namestr = names.tobytes()
# return namestr, outbytes
return [namestr[i:i + offset].split(b'\0', 1)[0].decode('utf-8') for i in range(0, outbytes, length)]

View File

@ -176,9 +176,9 @@ class Tickets(Handler):
pool.assignedGroups.add(auth.groups.get(uuid=addGrp))
# And now, to ALL metapool members
for metaMember in pool.members.all():
# First, add groups to metapool
# Now, add groups to metapool
for addGrp in set(groupIds) - set(metaMember.pool.assignedGroups.values_list('uuid', flat=True)):
metaMember.assignedGroups.add(auth.groups.get(uuid=addGrp))
metaMember.pool.assignedGroups.add(auth.groups.get(uuid=addGrp))
# For metapool, transport is ignored..