summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index fb5b2087..77710541 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -231,8 +231,8 @@ class ClientXMPP(BaseXMPP):
'subscription': subscription,
'groups': groups}}
response = iq.send(block, timeout, callback)
- if response in [False, None] or not isinstance(response, Iq):
- return response
+ if response is None:
+ return None
return response['type'] == 'result'
def del_roster_item(self, jid):
@@ -265,12 +265,7 @@ class ClientXMPP(BaseXMPP):
iq.enable('roster')
response = iq.send(block, timeout, callback)
- if response == False:
- self.event('roster_timeout')
-
- if response in [False, None] or not isinstance(response, Iq):
- return response
- else:
+ if callback is None:
return self._handle_roster(response, request=True)
def _handle_stream_features(self, features):