[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.
This commit is contained in:
Hornwitser 2018-07-31 15:19:23 +02:00 committed by Rapptz
parent c8b49d37be
commit d20772c680

View File

@ -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)