aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-06-17 13:49:05 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-06-17 13:49:05 -0400
commit11f04ba1bae774d32fd43bed4a0772c58d8df199 (patch)
tree7eec3a3fca5012f33602a9f0e434cd85ad1cb96b /klippy/mcu.py
parent863a463cb2d07fce2ae09e2b0f925bdf201051dc (diff)
downloadkutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.tar.gz
kutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.tar.xz
kutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.zip
configfile: Allow getchoice() to take a list
If a list is passed to getchoice(), seamlessly convert it to a dict. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r--klippy/mcu.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py
index 6b106245..23ba0717 100644
--- a/klippy/mcu.py
+++ b/klippy/mcu.py
@@ -574,9 +574,8 @@ class MCU:
restart_methods = [None, 'arduino', 'cheetah', 'command', 'rpi_usb']
self._restart_method = 'command'
if self._baud:
- rmethods = {m: m for m in restart_methods}
self._restart_method = config.getchoice('restart_method',
- rmethods, None)
+ restart_methods, None)
self._reset_cmd = self._config_reset_cmd = None
self._is_mcu_bridge = False
self._emergency_stop_cmd = None