From 8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 31 May 2011 12:48:43 -0700 Subject: 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'. --- tests/test_stream_handlers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/test_stream_handlers.py') diff --git a/tests/test_stream_handlers.py b/tests/test_stream_handlers.py index dae4456d..1b831e21 100644 --- a/tests/test_stream_handlers.py +++ b/tests/test_stream_handlers.py @@ -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) -- cgit v1.2.3