Mercurial > libervia-backend
diff src/plugins/plugin_tmp_demo_directory.py @ 1234:9c17bd37e6e5
core: better management of default value in getConfig
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 07 Oct 2014 17:12:41 +0200 |
parents | 301b342c697a |
children | 069ad98b360d |
line wrap: on
line diff
--- a/src/plugins/plugin_tmp_demo_directory.py Mon Oct 06 17:25:41 2014 +0200 +++ b/src/plugins/plugin_tmp_demo_directory.py Tue Oct 07 17:12:41 2014 +0200 @@ -76,11 +76,11 @@ def __init__(self, host): log.info(_(u"Plugin demo directory initialization")) - activate = host.memory.getConfig(CONFIG_SECTION, CONFIG_ACTIVATE) or 'false' + activate = host.memory.getConfig(CONFIG_SECTION, CONFIG_ACTIVATE, 'false') if not activate.lower() in ('true', 'yes', '1'): log.info("not activated") return - service_str = host.memory.getConfig(CONFIG_SECTION, CONFIG_SERVICE) or 'salut.libervia.org' + service_str = host.memory.getConfig(CONFIG_SECTION, CONFIG_SERVICE, 'salut.libervia.org') self.service = jid.JID(service_str) self.host = host host.memory.updateParams(self.params)