summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-02 22:03:29 -0700
committerLance Stout <lancestout@gmail.com>2012-04-06 15:09:26 -0400
commit4921c44d0afc6d0f975e4ee1467b32b96bb576b7 (patch)
treee43a257fe252f889f4c53a0d0932e612a1fe8ebe
parent3161f104c77f4dc37c17525ab6c9222b5f350bf1 (diff)
downloadslixmpp-4921c44d0afc6d0f975e4ee1467b32b96bb576b7.tar.gz
slixmpp-4921c44d0afc6d0f975e4ee1467b32b96bb576b7.tar.bz2
slixmpp-4921c44d0afc6d0f975e4ee1467b32b96bb576b7.tar.xz
slixmpp-4921c44d0afc6d0f975e4ee1467b32b96bb576b7.zip
Don't break test plugins that use None instead of a stream object.
-rw-r--r--sleekxmpp/plugins/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/base.py b/sleekxmpp/plugins/base.py
index ccea5ce4..fabee50d 100644
--- a/sleekxmpp/plugins/base.py
+++ b/sleekxmpp/plugins/base.py
@@ -269,7 +269,8 @@ class BasePlugin(object):
def __init__(self, xmpp, config=None):
self.xmpp = xmpp
- self.api = self.xmpp.api.wrap(self.name)
+ if self.xmpp:
+ self.api = self.xmpp.api.wrap(self.name)
#: A plugin's behaviour may be configurable, in which case those
#: configuration settings will be provided as a dictionary.