aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/configfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/configfile.py')
-rw-r--r--klippy/configfile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/klippy/configfile.py b/klippy/configfile.py
index 5d497c3d..8210de2b 100644
--- a/klippy/configfile.py
+++ b/klippy/configfile.py
@@ -209,6 +209,10 @@ class ConfigFileReader:
# in includes apply linearly as they do within a single file
buf = []
for line in lines:
+ # Strip trailing comment
+ pos = line.find('#')
+ if pos >= 0:
+ line = line[:pos]
# Process include or buffer line
mo = configparser.RawConfigParser.SECTCRE.match(line)
header = mo and mo.group('header')