Fix anarchy crash on empty inputs
This commit is contained in:
parent
dfbe9f6603
commit
58f102af60
@ -197,12 +197,12 @@ async def _(get_input: InputGetter, set_output: OutputSetter):
|
||||
|
||||
inputs: list[Input] = await get_input()
|
||||
|
||||
the_input = random.choice(inputs)
|
||||
|
||||
if not the_input:
|
||||
if not inputs:
|
||||
set_output(EMPTY_INPUT)
|
||||
continue
|
||||
|
||||
the_input = random.choice(inputs)
|
||||
|
||||
output = {button: the_input[button] for button in Button}
|
||||
|
||||
set_output(output)
|
||||
|
Loading…
Reference in New Issue
Block a user