mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
IqTimeout now references the original sent stanza.
A little extra bit of docs for IqError.
This commit is contained in:
parent
8aa4396e44
commit
20d053807d
2 changed files with 9 additions and 1 deletions
|
@ -61,7 +61,15 @@ class IqTimeout(Exception):
|
|||
received within the alloted time window.
|
||||
"""
|
||||
|
||||
def __init__(self, iq):
|
||||
self.iq = iq
|
||||
|
||||
class IqError(Exception):
|
||||
|
||||
"""
|
||||
An exception raised when an Iq stanza of type 'error' is received
|
||||
after making a blocking send call.
|
||||
"""
|
||||
|
||||
def __init__(self, iq):
|
||||
self.iq = iq
|
||||
|
|
|
@ -200,7 +200,7 @@ class Iq(RootStanza):
|
|||
StanzaBase.send(self, now=now)
|
||||
result = waitfor.wait(timeout)
|
||||
if not result:
|
||||
raise IqTimeout()
|
||||
raise IqTimeout(self)
|
||||
if result['type'] == 'error':
|
||||
raise IqError(result)
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue