summaryrefslogtreecommitdiff
path: root/libvirt-override-virStream.py
diff options
context:
space:
mode:
authorPhilipp Hahn <hahn@univention.de>2018-11-21 09:50:39 +0100
committerDaniel Berrange <berrange@redhat.com>2020-08-18 09:48:25 +0000
commit547965ecd954115e0acd7e6040701d9461d1c571 (patch)
treecfe81abbe0566a7b33f2406d4ac0f091708a700a /libvirt-override-virStream.py
parentd144e70957747bee9a9beff41c2e0fe14dc1093d (diff)
downloadlibvirt-python-547965ecd954115e0acd7e6040701d9461d1c571.tar.gz
stream: Convert type() to isinstance()
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'libvirt-override-virStream.py')
-rw-r--r--libvirt-override-virStream.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libvirt-override-virStream.py b/libvirt-override-virStream.py
index c05e0cd..667ec31 100644
--- a/libvirt-override-virStream.py
+++ b/libvirt-override-virStream.py
@@ -49,7 +49,7 @@
try:
ret = handler(self, got, opaque)
- if type(ret) is int and ret < 0:
+ if isinstance(ret, int) and ret < 0:
raise RuntimeError("recvAll handler returned %d" % ret)
except BaseException:
try:
@@ -204,7 +204,7 @@
self.abort()
raise RuntimeError("recvHole handler failed")
ret_hole = holeHandler(self, length, opaque)
- if type(ret_hole) is int and ret_hole < 0:
+ if isinstance(ret_hole, int) and ret_hole < 0:
self.abort()
raise RuntimeError("holeHandler handler returned %d" % ret_hole)
continue
@@ -217,7 +217,7 @@
break
ret_data = handler(self, got, opaque)
- if type(ret_data) is int and ret_data < 0:
+ if isinstance(ret_data, int) and ret_data < 0:
self.abort()
raise RuntimeError("sparseRecvAll handler returned %d" % ret_data)
@@ -264,7 +264,7 @@
want = sectionLen
got = handler(self, want, opaque)
- if type(got) is int and got < 0:
+ if isinstance(got, int) and got < 0:
self.abort()
raise RuntimeError("sparseSendAll handler returned %d" % got)