fix: do not use bare 'except'

This commit is contained in:
Inex Code 2024-07-15 17:05:38 +04:00
parent 5c5e098bab
commit d8fe54e0e9

View file

@ -1,4 +1,4 @@
from typing import AsyncGenerator, List
from typing import AsyncGenerator
from systemd import journal
import asyncio
@ -25,7 +25,7 @@ async def log_stream() -> AsyncGenerator[LogEntry, None]:
entry = await queue.get()
try:
yield LogEntry(entry)
except:
except Exception:
asyncio.get_event_loop().remove_reader(j)
return
queue.task_done()