summaryrefslogtreecommitdiff
path: root/libvirtaio.py
diff options
context:
space:
mode:
authorWojtek Porczyk <woju@invisiblethingslab.com>2017-09-14 02:26:53 +0200
committerDaniel P. Berrange <berrange@redhat.com>2017-09-26 11:01:33 +0100
commitfc482fc8688e9ba25ee19f34e5a692504ec85da3 (patch)
treef7cfb53796d6f41afb9bc89a0a1b04083936ce29 /libvirtaio.py
parentcc82a945286f011a465787b0fe998b396169fb18 (diff)
downloadlibvirt-python-fc482fc8688e9ba25ee19f34e5a692504ec85da3.tar.gz
libvirtaio: fix closing of the objects
- Descriptor.close() was a dead code, never used. - TimeoutCallback.close(), as a cleanup function, should have called super() as last statement, not first Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
Diffstat (limited to 'libvirtaio.py')
-rw-r--r--libvirtaio.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/libvirtaio.py b/libvirtaio.py
index 239561d..a7ede41 100644
--- a/libvirtaio.py
+++ b/libvirtaio.py
@@ -154,11 +154,6 @@ class Descriptor(object):
self.update()
return callback
- def close(self):
- ''''''
- self.callbacks.clear()
- self.update()
-
class DescriptorDict(dict):
'''Descriptors collection
@@ -249,8 +244,8 @@ class TimeoutCallback(Callback):
def close(self):
'''Stop the timer and call ff callback'''
- super(TimeoutCallback, self).close()
self.update(timeout=-1)
+ super(TimeoutCallback, self).close()
#
# main implementation