From 4921c44d0afc6d0f975e4ee1467b32b96bb576b7 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 2 Apr 2012 22:03:29 -0700 Subject: Don't break test plugins that use None instead of a stream object. --- sleekxmpp/plugins/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sleekxmpp') 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. -- cgit v1.2.3