mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-24 00:58:54 +03:00
examples: Do not use bare except
as it also catches SystemExit, InterruptedError, SyntaxError and such. Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
committed by
Philipp Hahn
parent
06aba185a8
commit
4e22f4de6f
@ -55,7 +55,7 @@ def stream_callback(stream: libvirt.virStream, events: int, console: Console) ->
|
||||
try:
|
||||
assert console.stream
|
||||
received_data = console.stream.recv(1024)
|
||||
except:
|
||||
except Exception:
|
||||
return
|
||||
os.write(0, received_data)
|
||||
|
||||
|
Reference in New Issue
Block a user