aboutsummaryrefslogtreecommitdiffstats
path: root/botcore/_bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'botcore/_bot.py')
-rw-r--r--botcore/_bot.py2
1 files changed, 1 insertions, 1 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):