From 871fce3f6df174068c954a3bf5d81640b12b8ad5 Mon Sep 17 00:00:00 2001 From: age Date: Fri, 9 Feb 2007 16:47:56 +0000 Subject: [PATCH] self.defaults as discussed --- plugins/network/network.py | 4 ++-- src/cryptobox/plugins/base.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/network/network.py b/plugins/network/network.py index 94015a6..df3cde5 100644 --- a/plugins/network/network.py +++ b/plugins/network/network.py @@ -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 diff --git a/src/cryptobox/plugins/base.py b/src/cryptobox/plugins/base.py index e0e4a89..e6391c9 100644 --- a/src/cryptobox/plugins/base.py +++ b/src/cryptobox/plugins/base.py @@ -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() + \