aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-08-19 14:59:53 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-08-21 18:08:11 -0400
commit7f82dcb442596959c667d0ed8f19e39af3f94b0d (patch)
tree798cbe5d68e4b4c5f4094a2fa7fae71bbd951ecc /klippy/extras
parent58dedb6b16796427466816e0f6f6eaccb464ca87 (diff)
downloadkutter-7f82dcb442596959c667d0ed8f19e39af3f94b0d.tar.gz
kutter-7f82dcb442596959c667d0ed8f19e39af3f94b0d.tar.xz
kutter-7f82dcb442596959c667d0ed8f19e39af3f94b0d.zip
endstop_phase: Use config.getintlist() for trigger_phase config option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/endstop_phase.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py
index 521a3c9f..254184db 100644
--- a/klippy/extras/endstop_phase.py
+++ b/klippy/extras/endstop_phase.py
@@ -67,11 +67,7 @@ class EndstopPhase:
self.endstop_phase = None
trigger_phase = config.get('trigger_phase', None)
if trigger_phase is not None:
- try:
- p, ps = [int(v.strip()) for v in trigger_phase.split('/')]
- except:
- raise config.error("Unable to parse trigger_phase '%s'"
- % (trigger_phase,))
+ p, ps = config.getintlist('trigger_phase', sep='/', count=2)
if p >= ps:
raise config.error("Invalid trigger_phase '%s'"
% (trigger_phase,))