only log idling/polling if use_idle==None
since we connect once to check idle capability and then again for the
rest, we'd be shown 'Will use XXX' twice if we don't do that.
@@ -122,12 +122,15 @@ class Py3status:
def _check_if_idle(self, connection):
supports_idle = b'IDLE' in connection.capability()[1][0].split()
+ log_method = False
if self.use_idle is None:
+ log_method = True
self.use_idle = supports_idle
elif self.use_idle and not supports_idle:
self.py3.error("Server does not support IDLE")
+ if log_method:
self.py3.log("Will use {}".format('idling' if self.use_idle else 'polling'))
def _connection_ssl(self):
