Rename side_effects to flags

This commit is contained in:
Dain Nilsson 2024-07-10 15:45:25 +02:00
parent 00705e736e
commit 3e21ad516b
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
3 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ def process(
send(dict(kind="signal", status=status, body=body))
def success(response: RpcResponse):
send(dict(kind="success", body=response.body, flags=response.side_effects))
send(dict(kind="success", body=response.body, flags=response.flags))
event = Event()
cmd_queue: Queue = Queue(1)

View File

@ -28,9 +28,9 @@ decode_bytes = bytes.fromhex
class RpcResponse:
def __init__(self, body, side_effects=None):
def __init__(self, body, flags=None):
self.body = body
self.side_effects = side_effects or []
self.flags = flags or []
class RpcException(Exception):

View File

@ -263,7 +263,7 @@ class AbstractDeviceNode(RpcNode):
def __call__(self, *args, **kwargs):
try:
response = super().__call__(*args, **kwargs)
if "device_info" in response.side_effects:
if "device_info" in response.flags:
# Clear DeviceInfo cache
self._info = None
self._data = None