forked from platypush/platypush
Filter out in get_plugins the special configuration fields not associated with plugins
This commit is contained in:
parent
d38746d278
commit
346b1be924
1 changed files with 11 additions and 1 deletions
|
@ -118,6 +118,16 @@ class Config(object):
|
|||
self._init_constants()
|
||||
self._init_components()
|
||||
|
||||
@staticmethod
|
||||
def _is_special_token(token):
|
||||
return token == 'main.db' or \
|
||||
token == 'token' or \
|
||||
token == 'token_hash' or \
|
||||
token == 'logging' or \
|
||||
token == 'workdir' or \
|
||||
token == 'device_id' or \
|
||||
token == 'switches' or \
|
||||
token == 'environment'
|
||||
|
||||
def _read_config_file(self, cfgfile):
|
||||
cfgfile_dir = os.path.dirname(os.path.abspath(
|
||||
|
@ -168,7 +178,7 @@ class Config(object):
|
|||
'_async': _async,
|
||||
'actions': self._config[key]
|
||||
}
|
||||
else:
|
||||
elif not self._is_special_token(key):
|
||||
self.plugins[key] = self._config[key]
|
||||
|
||||
def _init_constants(self):
|
||||
|
|
Loading…
Reference in a new issue