summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-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.