mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-29 07:21:27 +00:00
fix: do not use bare 'except'
This commit is contained in:
parent
5c5e098bab
commit
d8fe54e0e9
|
@ -1,4 +1,4 @@
|
||||||
from typing import AsyncGenerator, List
|
from typing import AsyncGenerator
|
||||||
from systemd import journal
|
from systemd import journal
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ async def log_stream() -> AsyncGenerator[LogEntry, None]:
|
||||||
entry = await queue.get()
|
entry = await queue.get()
|
||||||
try:
|
try:
|
||||||
yield LogEntry(entry)
|
yield LogEntry(entry)
|
||||||
except:
|
except Exception:
|
||||||
asyncio.get_event_loop().remove_reader(j)
|
asyncio.get_event_loop().remove_reader(j)
|
||||||
return
|
return
|
||||||
queue.task_done()
|
queue.task_done()
|
||||||
|
|
Loading…
Reference in a new issue