diff options
-rw-r--r-- | botcore/_bot.py | 2 | ||||
-rw-r--r-- | docs/changelog.rst | 4 | ||||
-rw-r--r-- | pyproject.toml | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/botcore/_bot.py b/botcore/_bot.py index a6362d0b..ee96faa9 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -281,7 +281,7 @@ class BotBase(commands.Bot): if self._resolver: await self._resolver.close() - if self.stats._transport: + if getattr(self.stats, "_transport", False): self.stats._transport.close() if getattr(self, "redis_session", False): diff --git a/docs/changelog.rst b/docs/changelog.rst index 049a0f8a..9d74eee8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,10 @@ Changelog ========= +- :release:`7.2.2 <9th July 2022>` +- :bug:`98` Only close ``BotBase.stats._transport`` if ``BotBase.stats`` was created + + - :release:`7.2.1 <30th June 2022>` - :bug:`96` Fix attempts to connect to ``BotBase.statsd_url`` when it is None. - :bug:`91` Fix incorrect docstring for ``botcore.utils.member.handle_role_change``. diff --git a/pyproject.toml b/pyproject.toml index e2720d18..ccb1a39d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bot-core" -version = "7.2.1" +version = "7.2.2" description = "Bot-Core provides the core functionality and utilities for the bots of the Python Discord community." authors = ["Python Discord <[email protected]>"] license = "MIT" |