Skip to content

Commit

Permalink
maint: Add extra debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed May 20, 2024
1 parent 83d6c34 commit 1c25de0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/o365/helpers/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,16 @@ async def _async_get_configured_mail_folder(
self, mail_folder_conf, mailbox, sensor_type
):
mail_folder = mailbox
_LOGGER.debug("Get folder %s - start", mail_folder_conf)

for folder in mail_folder_conf.split("/"):
mail_folder = await self.hass.async_add_executor_job(
ft.partial(
mail_folder.get_folder,
folder_name=folder,
)
)
_LOGGER.debug("Get folder %s - process - %s", mail_folder_conf, mail_folder)
if not mail_folder:
_LOGGER.error(
"Folder - %s - not found from %s config entry - %s - entity not created",
Expand All @@ -505,6 +508,7 @@ async def _async_get_configured_mail_folder(
)
return None

_LOGGER.debug("Get folder %s - finish ", mail_folder_conf)
return mail_folder

async def _async_update_data(self):
Expand Down

0 comments on commit 1c25de0

Please sign in to comment.