frobar: More corner cases

This commit is contained in:
Geoffrey Frogeye 2025-01-28 19:07:44 +01:00
parent aceb44293f
commit 684d9b4d8b
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -370,7 +370,11 @@ class Bar(ComposableText):
while True:
line = await proc.stdout.readline()
command = line.decode().strip()
callback = self.actions[command]
callback = self.actions.get(command)
if callback is None:
# In some conditions on start it's empty
log.error(f"Unknown command: {command}")
return
callback()
async with self.taskGroup: