Enhance plugin config with attribute accessors.

This makes updating the config after plugin initialization much easier.
This commit is contained in:
Lance Stout
2012-07-26 23:04:16 -07:00
parent 35396d2977
commit a06fa2de67
16 changed files with 154 additions and 86 deletions

View File

@@ -37,7 +37,10 @@ class XEP_0086(BasePlugin):
description = 'XEP-0086: Error Condition Mappings'
dependencies = set()
stanza = stanza
default_config = {
'override': True
}
def plugin_init(self):
register_stanza_plugin(Error, LegacyError,
overrides=self.config.get('override', True))
overrides=self.override)