summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-06-30 19:52:33 +0100
committerGravatar GitHub <[email protected]>2022-06-30 19:52:33 +0100
commit259eeb84f1d935e5254acbf673144f0b98aad965 (patch)
tree0a60df03a7c35df52ee7fe3e3893c84ab16af001
parentMerge pull request #91 from python-discord/misc-bug-fixes (diff)
parentDon't try to connect to statsd_url if it's None (diff)
Merge pull request #96 from python-discord/dont-connect-statsd-if-nonev7.2.1
-rw-r--r--botcore/_bot.py6
-rw-r--r--docs/changelog.rst2
-rw-r--r--pyproject.toml2
3 files changed, 7 insertions, 3 deletions
diff --git a/botcore/_bot.py b/botcore/_bot.py
index ed31d624..a6362d0b 100644
--- a/botcore/_bot.py
+++ b/botcore/_bot.py
@@ -239,9 +239,11 @@ class BotBase(commands.Bot):
# here. Normally, this shouldn't happen.
await self.redis_session.connect()
- # Create dummy stats client first, in case `statsd_url` is unreachable within `_connect_statsd()`
+ # Create dummy stats client first, in case `statsd_url` is unreachable or None
self.stats = AsyncStatsClient(loop, "127.0.0.1")
- self._connect_statsd(self.statsd_url, loop)
+ if self.statsd_url:
+ self._connect_statsd(self.statsd_url, loop)
+
await self.stats.create_socket()
try:
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 1ba60bd2..049a0f8a 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -4,6 +4,8 @@
Changelog
=========
+- :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``.
- :bug:`91` Pass missing self parameter to ``BotBase.ping_services``.
- :bug:`91` Add missing await to ``BotBase.ping_services`` in some cases.
diff --git a/pyproject.toml b/pyproject.toml
index ebf54f97..e2720d18 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bot-core"
-version = "7.2.0"
+version = "7.2.1"
description = "Bot-Core provides the core functionality and utilities for the bots of the Python Discord community."
authors = ["Python Discord <[email protected]>"]
license = "MIT"