aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/klippy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-05-25 12:47:51 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-05-25 12:47:51 -0400
commit20ddd842b7a2f9d31502da11c9358c990282d8e6 (patch)
tree03824d6f55b2206169a84d96ba24e24ebca08ea9 /klippy/klippy.py
parentc38a63d4db592177c86046e76d512c9e2a55955b (diff)
downloadkutter-20ddd842b7a2f9d31502da11c9358c990282d8e6.tar.gz
kutter-20ddd842b7a2f9d31502da11c9358c990282d8e6.tar.xz
kutter-20ddd842b7a2f9d31502da11c9358c990282d8e6.zip
klippy: Fix detection of mixed case section names
If a section name had mixed case it would cause an incorrect error during the section/option config checking. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r--klippy/klippy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py
index b05bcb12..624e7878 100644
--- a/klippy/klippy.py
+++ b/klippy/klippy.py
@@ -212,12 +212,12 @@ class Printer:
m.add_printer_objects(self, config)
# Validate that there are no undefined parameters in the config file
valid_sections = { s: 1 for s, o in self.all_config_options }
- for section in fileconfig.sections():
- section = section.lower()
+ for section_name in fileconfig.sections():
+ section = section_name.lower()
if section not in valid_sections and section not in self.objects:
raise self.config_error(
"Section '%s' is not a valid config section" % (section,))
- for option in fileconfig.options(section):
+ for option in fileconfig.options(section_name):
option = option.lower()
if (section, option) not in self.all_config_options:
raise self.config_error(