summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/clientxmpp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index e3d210ae..36b135d3 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -237,9 +237,13 @@ class ClientXMPP(BaseXMPP):
iq = self.Iq()
iq['type'] = 'get'
iq.enable('roster')
+
+ if not block and callback is None:
+ callback = lambda resp: self._handle_roster(resp, request=True)
+
response = iq.send(block, timeout, callback)
- if callback is None:
+ if block:
return self._handle_roster(response, request=True)
def _handle_connected(self, event=None):