mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
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>
This commit is contained in:
parent
863a463cb2
commit
11f04ba1ba
11 changed files with 12 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue