self.defaults as discussed

This commit is contained in:
age 2007-02-09 16:47:56 +00:00
parent 514f008b70
commit 871fce3f6d
2 changed files with 3 additions and 3 deletions

View file

@ -330,8 +330,8 @@ class network(cryptobox.plugins.base.CryptoBoxPlugin):
def __get_interface(self):
"""Return the name of the configured network interface
"""
if "interface" in self.defaults["network"]:
return self.defaults["network"]["interface"]
if "interface" in self.defaults:
return self.defaults["interface"]
else:
return DEFAULT_INTERFACE

View file

@ -84,7 +84,7 @@ class CryptoBoxPlugin:
self.cbox.log.debug("Plugin '%s': settings " % self.get_name() + \
"loaded from plugin configuration file: %s" % str(self.prefs))
if self.get_name() in self.cbox.prefs["PluginSettings"]:
self.defaults = self.cbox.prefs["PluginSettings"]
self.defaults = self.cbox.prefs["PluginSettings"][self.get_name()]
else:
self.defaults = {}
self.cbox.log.debug("Plugin '%s': configuration " % self.get_name() + \