1
0
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:
Philipp Hahn
2020-04-27 10:29:24 +02:00
committed by Philipp Hahn
parent 06aba185a8
commit 4e22f4de6f
2 changed files with 4 additions and 4 deletions

View File

@ -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)