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:
Lance Stout
2011-05-31 12:48:43 -07:00
parent 1469323350
commit 8aa4396e44
6 changed files with 32 additions and 21 deletions

View File

@@ -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)