printer: fix issue that could cause the panels to not show up on startup if moonraker is not connected
This commit is contained in:
parent
43c3a4b20d
commit
abe12cca30
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user