From d38347c5345e1dbcbba2dacca9fca03835c9d454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 19 Jul 2021 13:25:43 +0200 Subject: [PATCH] Fixed ticket for metapools & fixed get interfaces list for python > 3.2 (as is the case) --- actor/src/udsactor/linux/operations.py | 2 +- server/src/uds/REST/methods/tickets.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actor/src/udsactor/linux/operations.py b/actor/src/udsactor/linux/operations.py index ba94ba38c..f20be57e6 100644 --- a/actor/src/udsactor/linux/operations.py +++ b/actor/src/udsactor/linux/operations.py @@ -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)] diff --git a/server/src/uds/REST/methods/tickets.py b/server/src/uds/REST/methods/tickets.py index d5d7bd4c7..52696030e 100644 --- a/server/src/uds/REST/methods/tickets.py +++ b/server/src/uds/REST/methods/tickets.py @@ -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..