From 11f04ba1bae774d32fd43bed4a0772c58d8df199 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 17 Jun 2024 13:49:05 -0400 Subject: 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 --- klippy/mcu.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'klippy/mcu.py') 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 -- cgit v1.2.3-70-g09d2