aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-07-31 15:19:23 +0200
committerRapptz <[email protected]>2018-08-22 21:43:54 -0400
commitd20772c680817bc576fc9ef2d9e643642862f94d (patch)
treefff599487027c8ba2c9c530923810f246600f108
parent[lint] Fix incorrect and inconsistent whitespace (diff)
downloaddiscord.py-d20772c680817bc576fc9ef2d9e643642862f94d.tar.xz
discord.py-d20772c680817bc576fc9ef2d9e643642862f94d.zip
[lint] Replace deprecated Logger function warn
The method log of Logger has never been documented as being a part of the standard logging module. It was renamed to warning when the module was included in the standard library, but the old name was kept for backward compatibility.
-rw-r--r--discord/gateway.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/gateway.py b/discord/gateway.py
index e5c4cb82..a1f77193 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -69,7 +69,7 @@ class KeepAliveHandler(threading.Thread):
def run(self):
while not self._stop_ev.wait(self.interval):
if self._last_ack + self.heartbeat_timeout < time.monotonic():
- log.warn("Shard ID %s has stopped responding to the gateway. Closing and restarting." % self.shard_id)
+ log.warning("Shard ID %s has stopped responding to the gateway. Closing and restarting." % self.shard_id)
coro = self.ws.close(4000)
f = asyncio.run_coroutine_threadsafe(coro, loop=self.ws.loop)