Begin experimental use of exceptions.
Provides IqTimeout and IqError which are raised when an Iq response does not arrive in time, or it arrives with type='error'.
This commit is contained in:
@@ -90,7 +90,10 @@ class TestHandlers(SleekTest):
|
||||
iq['id'] = 'test2'
|
||||
iq['type'] = 'set'
|
||||
iq['query'] = 'test2'
|
||||
reply = iq.send(block=True, timeout=0)
|
||||
try:
|
||||
reply = iq.send(block=True, timeout=0)
|
||||
except IqTimeout:
|
||||
pass
|
||||
|
||||
self.xmpp.add_event_handler('message', waiter_handler, threaded=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user