From abe12cca30455cab1b9f8a559a9261c4cc4e8fce Mon Sep 17 00:00:00 2001 From: alfrix Date: Mon, 5 Sep 2022 20:58:15 -0300 Subject: [PATCH] printer: fix issue that could cause the panels to not show up on startup if moonraker is not connected --- ks_includes/printer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ks_includes/printer.py b/ks_includes/printer.py index 34be81f3..2ad1d5c6 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -199,7 +199,9 @@ class Printer: logging.debug(f"Power devices: {self.power_devices}") def get_config_section_list(self, search=""): - return [i for i in list(self.config) if i.startswith(search)] if hasattr(self, "config") else [] + if self.config is not None: + return [i for i in list(self.config) if i.startswith(search)] if hasattr(self, "config") else [] + return [] def get_config_section(self, section): return self.config[section] if section in self.config else False