From ffde8d451e02f1cb084e08557b52f2e5ffae6206 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> Date: Wed, 3 Jul 2019 22:04:24 +0200 Subject: Removing redundant self.__class__.__name__ occurrences Co-Authored-By: Mark --- bot/cogs/watchchannels/watchchannel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot/cogs/watchchannels/watchchannel.py b/bot/cogs/watchchannels/watchchannel.py index 7f7efacaa..977695134 100644 --- a/bot/cogs/watchchannels/watchchannel.py +++ b/bot/cogs/watchchannels/watchchannel.py @@ -187,7 +187,7 @@ class WatchChannel(ABC): self.log.trace(f"Sleeping {BigBrotherConfig.log_delay} seconds before consuming message queue") await asyncio.sleep(BigBrotherConfig.log_delay) - self.log.trace(f"{self.__class__.__name__} started consuming the message queue") + self.log.trace(f"Started consuming the message queue") # If the previous consumption Task failed, first consume the existing comsumption_queue if not self.consumption_queue: @@ -222,7 +222,7 @@ class WatchChannel(ABC): await self.webhook.send(content=content, username=username, avatar_url=avatar_url, embed=embed) except discord.HTTPException as exc: self.log.exception( - f"Failed to send message to {self.__class__.__name__} webhook", + f"Failed to send a message to the webhook", exc_info=exc ) @@ -265,7 +265,7 @@ class WatchChannel(ABC): ) except discord.HTTPException as exc: self.log.exception( - f"Failed to send an attachment to {self.__class__.__name__} webhook", + f"Failed to send an attachment to the webhook", exc_info=exc ) @@ -348,6 +348,6 @@ class WatchChannel(ABC): self._consume_task.result() except asyncio.CancelledError as e: self.log.exception( - f"The {self.__class__._name__} consume task was canceled. Messages may be lost.", + f"The consume task was canceled. Messages may be lost.", exc_info=e ) -- cgit v1.2.3