Skip to content

Commit

Permalink
move handle_knxipframe() out of try block
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Dec 21, 2020
1 parent c7f9301 commit d104090
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xknx/io/udp_client.py
Expand Up @@ -94,14 +94,15 @@ def data_received_callback(self, raw: bytes):
try:
knxipframe = KNXIPFrame(self.xknx)
knxipframe.from_knx(raw)
knx_logger.debug("Received: %s", knxipframe)
self.handle_knxipframe(knxipframe)
except CouldNotParseKNXIP as couldnotparseknxip:
knx_logger.debug(
"Unsupported KNXIPFrame: %s in %s",
couldnotparseknxip.description,
raw.hex(),
)
else:
knx_logger.debug("Received: %s", knxipframe)
self.handle_knxipframe(knxipframe)

def handle_knxipframe(self, knxipframe: KNXIPFrame) -> None:
"""Handle KNXIP Frame and call all callbacks which watch for the service type ident."""
Expand Down

0 comments on commit d104090

Please sign in to comment.