summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-08 15:59:47 -0400
committerLance Stout <lancestout@gmail.com>2012-04-08 15:59:47 -0400
commitaf099737ab43b20cf6684fe963e84ae3ef5a3354 (patch)
tree68ad96988eaac1b16f3fab7de0b8a41c7ff8e2dd
parent9ffde5ab3706ca24b03dbea93c67810687c4b6ba (diff)
downloadslixmpp-af099737ab43b20cf6684fe963e84ae3ef5a3354.tar.gz
slixmpp-af099737ab43b20cf6684fe963e84ae3ef5a3354.tar.bz2
slixmpp-af099737ab43b20cf6684fe963e84ae3ef5a3354.tar.xz
slixmpp-af099737ab43b20cf6684fe963e84ae3ef5a3354.zip
Ensure that accessing self.api.settings works for plugins.
-rw-r--r--sleekxmpp/api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/api.py b/sleekxmpp/api.py
index 25bfe0e6..3261f67f 100644
--- a/sleekxmpp/api.py
+++ b/sleekxmpp/api.py
@@ -6,6 +6,8 @@ class APIWrapper(object):
def __init__(self, api, name):
self.api = api
self.name = name
+ if name not in self.api.settings:
+ self.api.settings[name] = {}
def __getattr__(self, attr):
"""Curry API management commands with the API name."""