From 346b1be924241257e3873745727c63c57faeba62 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 1 Dec 2019 23:53:14 +0100 Subject: [PATCH] Filter out in get_plugins the special configuration fields not associated with plugins --- platypush/config/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/platypush/config/__init__.py b/platypush/config/__init__.py index 82505c069d..3f1c70d03c 100644 --- a/platypush/config/__init__.py +++ b/platypush/config/__init__.py @@ -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):