Skip to content
Snippets Groups Projects
Commit dc72aa70 authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Fix a bug which occurs for devices w/ no Attributes

While hunting to fix pyright errors, I introduced this nasty bug.
Device w/ no attributes will not answer to get_attributes, which is
right but not mandatory and introduce edge case in tools.
parent 835e37b0
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,6 @@ import typing
from enum import Enum
from typing import Optional
from .config import config
from . import core
from .exceptions import CallbackError, MessageParserError, XAALError
......@@ -135,11 +133,11 @@ class Engine(core.EngineMixin):
* error returned on the xAAL bus
"""
if msg.action is None:
return # should not happen, but pyright need this check
return # should not happen, but pyright need this check
try:
result = run_action(msg, target)
if result:
if result is not None:
self.send_reply(dev=target, targets=[msg.source], action=msg.action, body=result)
except CallbackError as e:
self.send_error(target, e.code, e.description)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment