From 99c21475126c20a090d09c92d54e29b331e75fed Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 14 Nov 2018 13:08:57 +0000 Subject: [PATCH] Don't assume a reconnect timer event will always have connection_params --- src/IRCBot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCBot.py b/src/IRCBot.py index bad40a2f..63cbbde3 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -130,7 +130,8 @@ class Bot(object): del self.servers[server.fileno()] def _timed_reconnect(self, event: EventManager.Event): - if not self.reconnect(event["server_id"], event["connection_params"]): + if not self.reconnect(event["server_id"], + event.get("connection_params", None)): event["timer"].redo() def reconnect(self, server_id: int, connection_params: typing.Optional[ utils.irc.IRCConnectionParameters]=None) -> bool: