diff options
author | Philipp Hahn <hahn@univention.de> | 2020-04-27 10:29:24 +0200 |
---|---|---|
committer | Daniel Berrange <berrange@redhat.com> | 2020-08-18 09:48:25 +0000 |
commit | 9074b502598949bffac8ce0c5b7a04b38a5c523c (patch) | |
tree | e7e77f4f5196a16ba79d721873db5fc99f52d2ec /libvirt-override-virStream.py | |
parent | 57770081971f3f52002926ea7aa2d1bb135216c4 (diff) | |
download | libvirt-python-9074b502598949bffac8ce0c5b7a04b38a5c523c.tar.gz |
stream: Do not use bare except
as it also catches SystemExit, InterruptedError, SyntaxError and such.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'libvirt-override-virStream.py')
-rw-r--r-- | libvirt-override-virStream.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvirt-override-virStream.py b/libvirt-override-virStream.py index 722784b..998ad41 100644 --- a/libvirt-override-virStream.py +++ b/libvirt-override-virStream.py @@ -51,11 +51,11 @@ ret = handler(self, got, opaque) if type(ret) is int and ret < 0: raise RuntimeError("recvAll handler returned %d" % ret) - except Exception: + except BaseException: e = sys.exc_info()[1] try: self.abort() - except: + except Exception: pass raise e @@ -76,11 +76,11 @@ while True: try: got = handler(self, virStorageVol.streamBufSize, opaque) - except: + except BaseException: e = sys.exc_info()[1] try: self.abort() - except: + except Exception: pass raise e |