From 178d5455064fec8a05f94b7fbe00ce1401a3c43d Mon Sep 17 00:00:00 2001 From: Michel van de Wetering Date: Wed, 20 Dec 2023 14:06:49 +0100 Subject: [PATCH] Add stacktrace for asyncio.CancelledError --- custom_components/huesyncbox/config_flow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/huesyncbox/config_flow.py b/custom_components/huesyncbox/config_flow.py index 39f9523..afbc2ed 100644 --- a/custom_components/huesyncbox/config_flow.py +++ b/custom_components/huesyncbox/config_flow.py @@ -216,11 +216,11 @@ async def _async_register( _LOGGER.exception("Unknown Philips Hue Play HDMI Sync Box error occurred") return False except asyncio.CancelledError: - _LOGGER.debug("_async_register, %s", "asyncio.CancelledError") + _LOGGER.debug("_async_register, asyncio.CancelledError", exc_info=True) cancelled = True finally: # Only gets cancelled when flow is removed, don't call things on flow after that - _LOGGER.debug("_async_register, %s, %s", "finally", cancelled) + _LOGGER.debug("_async_register, finally, %s", cancelled) if not cancelled: # Continue the flow after show progress when the task is done. # To avoid a potential deadlock we create a new task that continues the flow. @@ -252,6 +252,7 @@ async def async_step_link(self, user_input=None) -> FlowResult: registered = self.link_task.result() except asyncio.CancelledError: # Was cancelled, so not registered + _LOGGER.debug("async_step_link, asyncio.CancelledError", exc_info=True) pass except asyncio.InvalidStateError: # Was not done, so not registered, cancel it