From af099737ab43b20cf6684fe963e84ae3ef5a3354 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 8 Apr 2012 15:59:47 -0400 Subject: Ensure that accessing self.api.settings works for plugins. --- sleekxmpp/api.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sleekxmpp') 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.""" -- cgit v1.2.3