aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/configfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/configfile.py')
-rw-r--r--klippy/configfile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/configfile.py b/klippy/configfile.py
index 91b555cd..a8a4a4ff 100644
--- a/klippy/configfile.py
+++ b/klippy/configfile.py
@@ -69,6 +69,8 @@ class ConfigWrapper:
return self._get_wrapper(self.fileconfig.getboolean, option, default,
note_valid=note_valid)
def getchoice(self, option, choices, default=sentinel, note_valid=True):
+ if type(choices) == type([]):
+ choices = {i: i for i in choices}
if choices and type(list(choices.keys())[0]) == int:
c = self.getint(option, default, note_valid=note_valid)
else: