forked from shaba/openuds
Fixed ticket for metapools & fixed get interfaces list for python > 3.2 (as is the case)
This commit is contained in:
parent
693d14cd81
commit
d38347c534
@ -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)]
|
||||
|
||||
|
@ -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..
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user