[core/config] make configurable module list work

configparser doesn't seem to have direct array support,
so use format.aslist() to get a list of modules

fixes #678
This commit is contained in:
tobi-wan-kenobi 2020-07-09 07:04:45 +02:00
parent a9f50f1b51
commit 72045b2318

View file

@ -237,9 +237,10 @@ class Config(util.store.Store):
""" """
def modules(self): def modules(self):
list_of_modules = self.get('modules', None) list_of_modules = [item for sub in self.__args.modules for item in sub]
if (list_of_modules is None) or (type(list_of_modules) != list):
list_of_modules = [item for sub in self.__args.modules for item in sub] if list_of_modules == []:
list_of_modules = util.format.aslist(self.get('modules', []))
return list_of_modules return list_of_modules
"""Returns the global update interval """Returns the global update interval