self.defaults as discussed
This commit is contained in:
parent
514f008b70
commit
871fce3f6d
|
@ -330,8 +330,8 @@ class network(cryptobox.plugins.base.CryptoBoxPlugin):
|
||||||
def __get_interface(self):
|
def __get_interface(self):
|
||||||
"""Return the name of the configured network interface
|
"""Return the name of the configured network interface
|
||||||
"""
|
"""
|
||||||
if "interface" in self.defaults["network"]:
|
if "interface" in self.defaults:
|
||||||
return self.defaults["network"]["interface"]
|
return self.defaults["interface"]
|
||||||
else:
|
else:
|
||||||
return DEFAULT_INTERFACE
|
return DEFAULT_INTERFACE
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ class CryptoBoxPlugin:
|
||||||
self.cbox.log.debug("Plugin '%s': settings " % self.get_name() + \
|
self.cbox.log.debug("Plugin '%s': settings " % self.get_name() + \
|
||||||
"loaded from plugin configuration file: %s" % str(self.prefs))
|
"loaded from plugin configuration file: %s" % str(self.prefs))
|
||||||
if self.get_name() in self.cbox.prefs["PluginSettings"]:
|
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:
|
else:
|
||||||
self.defaults = {}
|
self.defaults = {}
|
||||||
self.cbox.log.debug("Plugin '%s': configuration " % self.get_name() + \
|
self.cbox.log.debug("Plugin '%s': configuration " % self.get_name() + \
|
||||||
|
|
Loading…
Reference in a new issue