diff options
| author | 2018-08-30 17:20:55 +0100 | |
|---|---|---|
| committer | 2018-08-30 17:20:55 +0100 | |
| commit | 656cb8153a5db981152b852373d728734f1c2e44 (patch) | |
| tree | 90386c7ede0af46423eba60ff072312862cd3046 /IRCBot.py | |
| parent | Database.add_server -> Database.servers.add (diff) | |
| signature | ||
return "None" timeouts when there's no servers in IRCBot.servers
Diffstat (limited to 'IRCBot.py')
| -rw-r--r-- | IRCBot.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -91,11 +91,15 @@ class Bot(object): timeouts = [] for server in self.servers.values(): timeouts.append(server.until_next_ping()) + if not timeouts: + return None return min(timeouts) def next_read_timeout(self): timeouts = [] for server in self.servers.values(): timeouts.append(server.until_read_timeout()) + if not timeouts: + return None return min(timeouts) def get_poll_timeout(self): |
