From c763bd5a5b199fe86eda300ccd49f61a73aebd70 Mon Sep 17 00:00:00 2001 From: alfrix Date: Wed, 20 Apr 2022 14:54:47 -0300 Subject: [PATCH] fans: fix for machines without [fan] --- 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 413a79d0..4f045655 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -217,7 +217,9 @@ class Printer: return self.data def get_fans(self): - fans = ["fan"] if len(self.get_config_section_list("fan")) > 0 else [] + fans = [] + if self.config_section_exists("fan"): + fans.append("fan") fan_types = ["controller_fan", "fan_generic", "heater_fan"] for type in fan_types: for f in self.get_config_section_list("%s " % type):