diff options
author | 2022-07-09 19:32:04 +0100 | |
---|---|---|
committer | 2022-07-09 19:32:04 +0100 | |
commit | 70bdf0f7e50cf182390dbeed38232438d54ea16e (patch) | |
tree | 64cde33e3eb080d970ed1a63185d0a64ccaac025 | |
parent | Merge pull request #96 from python-discord/dont-connect-statsd-if-none (diff) | |
parent | Only close stats._transport if BotBase.stats was created (diff) |
Merge pull request #98 from python-discord/fix-stats-closev7.2.2
-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" |