Commit b3fdc536 authored by Yann Leboulanger's avatar Yann Leboulanger

[NooN8] checks if something is not in a list/dict/.. should be done with 'var not in list'

parent eb88300e
......@@ -557,7 +557,7 @@ class NonBlockingClient:
if data:
if not 'SASL' in self.__dict__:
if 'SASL' not in self.__dict__:
# SASL is pluged out, possible disconnect
if self.SASL.startsasl == 'in-process':
......@@ -269,7 +269,7 @@ class IdleQueue:
Remove alarm callback alarm_cb scheduled on alarm_time. Returns True if
it was removed sucessfully, otherwise False
if not alarm_time in self.alarms:
if alarm_time not in self.alarms:
return False
i = -1
for i in range(len(self.alarms[alarm_time])):
......@@ -278,7 +278,7 @@ class IdleQueue:
if i != -1:
del self.alarms[alarm_time][i]
if self.alarms[alarm_time] == []:
if not self.alarms[alarm_time]:
del self.alarms[alarm_time]
return True
......@@ -74,7 +74,7 @@ class NonBlockingRoster(PlugIn):
roster representation
sender = stanza.getAttr('from')
if not sender is None and not sender.bareMatch(
if sender is not None and not sender.bareMatch(
self._owner.User + '@' + self._owner.Server):
query = stanza.getTag('query')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment