diff options
author | Lance Stout <lancestout@gmail.com> | 2012-02-18 11:56:10 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-02-18 11:56:10 -0800 |
commit | 977fcc06324d93422cb19e1550b280cd04e36f82 (patch) | |
tree | f6bbe985ba54ed4c0bc880cfb65eb66cc8412581 /sleekxmpp | |
parent | 94b57d232d0fd1198835a93a013e1f9ff715d5eb (diff) | |
download | slixmpp-977fcc06324d93422cb19e1550b280cd04e36f82.tar.gz slixmpp-977fcc06324d93422cb19e1550b280cd04e36f82.tar.bz2 slixmpp-977fcc06324d93422cb19e1550b280cd04e36f82.tar.xz slixmpp-977fcc06324d93422cb19e1550b280cd04e36f82.zip |
Fix instances of using undefined variables.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/xep_0030/disco.py | 2 | ||||
-rw-r--r-- | sleekxmpp/plugins/xep_0030/static.py | 2 | ||||
-rw-r--r-- | sleekxmpp/plugins/xep_0066/oob.py | 2 | ||||
-rw-r--r-- | sleekxmpp/plugins/xep_0078/legacyauth.py | 2 | ||||
-rw-r--r-- | sleekxmpp/thirdparty/mini_dateutil.py | 5 | ||||
-rw-r--r-- | sleekxmpp/thirdparty/suelta/mechanisms/digest_md5.py | 2 |
6 files changed, 10 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py index 2267401e..a6088635 100644 --- a/sleekxmpp/plugins/xep_0030/disco.py +++ b/sleekxmpp/plugins/xep_0030/disco.py @@ -754,7 +754,7 @@ class xep_0030(base_plugin): """ result = info if isinstance(info, Iq): - info = iq['disco_info'] + info = info['disco_info'] if not info['node']: if not info['identities']: if self.xmpp.is_component: diff --git a/sleekxmpp/plugins/xep_0030/static.py b/sleekxmpp/plugins/xep_0030/static.py index e0ac29c6..4972bdeb 100644 --- a/sleekxmpp/plugins/xep_0030/static.py +++ b/sleekxmpp/plugins/xep_0030/static.py @@ -11,7 +11,7 @@ import threading import sleekxmpp from sleekxmpp import Iq -from sleekxmpp.exceptions import XMPPError +from sleekxmpp.exceptions import XMPPError, IqError, IqTimeout from sleekxmpp.plugins.base import base_plugin from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import StanzaPath diff --git a/sleekxmpp/plugins/xep_0066/oob.py b/sleekxmpp/plugins/xep_0066/oob.py index d1f4b3ff..0e73de07 100644 --- a/sleekxmpp/plugins/xep_0066/oob.py +++ b/sleekxmpp/plugins/xep_0066/oob.py @@ -121,7 +121,7 @@ class xep_0066(base_plugin): iq -- The Iq stanza containing the OOB transfer request. """ if iq['to'] in self.url_handlers['jid']: - return self.url_handlers['jid'][jid](iq) + return self.url_handlers['jid'][iq['to']](iq) else: if self.url_handlers['global']: self.url_handlers['global'](iq) diff --git a/sleekxmpp/plugins/xep_0078/legacyauth.py b/sleekxmpp/plugins/xep_0078/legacyauth.py index dec775a3..d1495c78 100644 --- a/sleekxmpp/plugins/xep_0078/legacyauth.py +++ b/sleekxmpp/plugins/xep_0078/legacyauth.py @@ -9,7 +9,9 @@ import logging import hashlib import random +import sys +from sleekxmpp.exceptions import IqError, IqTimeout from sleekxmpp.stanza import Iq, StreamFeatures from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin from sleekxmpp.plugins.base import base_plugin diff --git a/sleekxmpp/thirdparty/mini_dateutil.py b/sleekxmpp/thirdparty/mini_dateutil.py index 6af5ffde..d0d3f2ea 100644 --- a/sleekxmpp/thirdparty/mini_dateutil.py +++ b/sleekxmpp/thirdparty/mini_dateutil.py @@ -67,6 +67,7 @@ import re +import math import datetime @@ -240,12 +241,12 @@ except: if frac != None: # ok, fractions of hour? if min == None: - frac, min = _math.modf(frac * 60.0) + frac, min = math.modf(frac * 60.0) min = int(min) # fractions of second? if s == None: - frac, s = _math.modf(frac * 60.0) + frac, s = math.modf(frac * 60.0) s = int(s) # and extract microseconds... diff --git a/sleekxmpp/thirdparty/suelta/mechanisms/digest_md5.py b/sleekxmpp/thirdparty/suelta/mechanisms/digest_md5.py index 5492c553..890f3e24 100644 --- a/sleekxmpp/thirdparty/suelta/mechanisms/digest_md5.py +++ b/sleekxmpp/thirdparty/suelta/mechanisms/digest_md5.py @@ -1,8 +1,10 @@ import sys import random +import hmac from sleekxmpp.thirdparty.suelta.util import hash, bytes, quote +from sleekxmpp.thirdparty.suelta.util import num_to_bytes, bytes_to_num from sleekxmpp.thirdparty.suelta.sasl import Mechanism, register_mechanism from sleekxmpp.thirdparty.suelta.exceptions import SASLError, SASLCancelled |