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()
|
inputs: list[Input] = await get_input()
|
||||||
|
|
||||||
the_input = random.choice(inputs)
|
if not inputs:
|
||||||
|
|
||||||
if not the_input:
|
|
||||||
set_output(EMPTY_INPUT)
|
set_output(EMPTY_INPUT)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
the_input = random.choice(inputs)
|
||||||
|
|
||||||
output = {button: the_input[button] for button in Button}
|
output = {button: the_input[button] for button in Button}
|
||||||
|
|
||||||
set_output(output)
|
set_output(output)
|
||||||
|
Loading…
Reference in New Issue
Block a user