Don't break test plugins that use None instead of a stream object.

This commit is contained in:
Lance Stout 2012-04-02 22:03:29 -07:00
parent 3161f104c7
commit 4921c44d0a

View file

@ -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.