summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/iq.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-11-18 00:44:51 -0500
committerLance Stout <lancestout@gmail.com>2010-11-18 00:44:51 -0500
commit58b95e4ae45432ae97bd643c591f4f078f29f300 (patch)
tree0bf29e982c6f7a7d486d00f01188e021ab193aa1 /sleekxmpp/stanza/iq.py
parentdebf90935981622c7b23009b7edeb311fd57ee5c (diff)
parent60d3afe6b6814bb5d30c4d4d355451d3c15364ca (diff)
downloadslixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.gz
slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.bz2
slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.tar.xz
slixmpp-58b95e4ae45432ae97bd643c591f4f078f29f300.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into roster
Diffstat (limited to 'sleekxmpp/stanza/iq.py')
-rw-r--r--sleekxmpp/stanza/iq.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py
index 614d14f5..150baa00 100644
--- a/sleekxmpp/stanza/iq.py
+++ b/sleekxmpp/stanza/iq.py
@@ -8,7 +8,7 @@
from sleekxmpp.stanza import Error
from sleekxmpp.stanza.rootstanza import RootStanza
-from sleekxmpp.xmlstream import RESPONSE_TIMEOUT, StanzaBase, ET
+from sleekxmpp.xmlstream import StanzaBase, ET
from sleekxmpp.xmlstream.handler import Waiter
from sleekxmpp.xmlstream.matcher import MatcherId
@@ -157,7 +157,7 @@ class Iq(RootStanza):
StanzaBase.reply(self)
return self
- def send(self, block=True, timeout=RESPONSE_TIMEOUT):
+ def send(self, block=True, timeout=None):
"""
Send an <iq> stanza over the XML stream.
@@ -174,6 +174,8 @@ class Iq(RootStanza):
before exiting the send call if blocking is used.
Defaults to sleekxmpp.xmlstream.RESPONSE_TIMEOUT
"""
+ if timeout is None:
+ timeout = self.stream.response_timeout
if block and self['type'] in ('get', 'set'):
waitfor = Waiter('IqWait_%s' % self['id'], MatcherId(self['id']))
self.stream.registerHandler(waitfor)