macros: fix list not loading when there are extra spaces fixes #909

This commit is contained in:
alfrix
2023-03-10 19:57:44 -06:00
parent be473bf626
commit dfe1ac8d2c
2 changed files with 14 additions and 2 deletions

View File

@@ -153,7 +153,14 @@ class Printer:
return []
def get_config_section(self, section):
return self.config[section] if section in self.config else False
return next(
(
self.config[key]
for key in self.config.keys()
if key.find(section) > -1
),
False,
)
def get_fans(self):
fans = []