Remove list(map(int, x))

This commit is contained in:
caitsith2 2020-06-18 19:21:52 -07:00
parent d7d7f32d0c
commit 55a5812b6b
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ def get_choice(option, root, value=None) -> typing.Any:
return interpret_on_off(root[option])
if not root[option]:
return value
if any(list(map(int, root[option].values()))):
if any(root[option].values()):
return interpret_on_off(
random.choices(list(root[option].keys()), weights=list(map(int, root[option].values())))[0])
raise RuntimeError(f"All options specified in {option} are weighted as zero.")