From dd87cd7366acb801a83373669d0bfe806a3750db Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Thu, 14 Oct 2021 20:48:10 -0400 Subject: [PATCH] Update some log messages --- matrix_puppeteer_line/portal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix_puppeteer_line/portal.py b/matrix_puppeteer_line/portal.py index 2036e8a..a05fd49 100644 --- a/matrix_puppeteer_line/portal.py +++ b/matrix_puppeteer_line/portal.py @@ -540,7 +540,7 @@ class Portal(DBPortal, BasePortal): async def _update_icon(self, icon: Optional[PathImage], client: Optional[Client]) -> bool: if icon: if icon.url and not icon.path: - self.log.warn(f"Using URL as path for room icon of {self.name}") + self.log.warn(f"Using URL as path for room icon of {self.name or self.chat_id}") icon_path = icon_url = icon.url else: icon_path = icon.path @@ -549,7 +549,7 @@ class Portal(DBPortal, BasePortal): icon_path = icon_url = None if icon_path != self.icon_path: - self.log.info(f"Updating room icon of {self.name}") + self.log.info(f"Updating room icon of {self.name or self.chat_id}") self.icon_path = icon_path if icon_url: if not client: @@ -566,7 +566,7 @@ class Portal(DBPortal, BasePortal): self.log.exception(f"Failed to set room icon: {e}") return True else: - self.log.debug(f"No need to update room icon of {self.name}, new icon has same path as old one") + self.log.debug(f"No need to update room icon of {self.name or self.chat_id}, new icon has same path as old one") return False async def _update_participants(self, participants: List[Participant]) -> None: