From 72045b2318280410e5191692866268bf4c823c33 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Thu, 9 Jul 2020 07:04:45 +0200 Subject: [PATCH] [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 --- bumblebee_status/core/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bumblebee_status/core/config.py b/bumblebee_status/core/config.py index 0a47f93..94a92e5 100644 --- a/bumblebee_status/core/config.py +++ b/bumblebee_status/core/config.py @@ -237,9 +237,10 @@ class Config(util.store.Store): """ def modules(self): - list_of_modules = self.get('modules', None) - 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] + 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 """Returns the global update interval