diff options
author | Lance Stout <lancestout@gmail.com> | 2012-04-02 22:03:29 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-04-06 15:09:26 -0400 |
commit | 4921c44d0afc6d0f975e4ee1467b32b96bb576b7 (patch) | |
tree | e43a257fe252f889f4c53a0d0932e612a1fe8ebe /sleekxmpp/plugins/base.py | |
parent | 3161f104c77f4dc37c17525ab6c9222b5f350bf1 (diff) | |
download | slixmpp-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.
Diffstat (limited to 'sleekxmpp/plugins/base.py')
-rw-r--r-- | sleekxmpp/plugins/base.py | 3 |
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. |