diff options
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r-- | module/plugins/internal/Plugin.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index b89772052..16aa9cc45 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -104,14 +104,18 @@ class Base(object): return self.setConfig(*args, **kwargs) - def getConfig(self, option): + def getConfig(self, option, default=""): """ Returns config value for current plugin :param option: :return: """ - return self.core.config.getPlugin(self.__name__, option) + try: + return self.core.config.getPlugin(self.__name__, option) + + except KeyError: + return default #: Deprecated method @@ -166,7 +170,7 @@ class Base(object): class Plugin(Base): __name__ = "Plugin" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'^unmatchable$' __config__ = [] #: [("name", "type", "desc", "default")] |