1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-15 20:59:34 +03:00

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>
This commit is contained in:
Wojtek Porczyk
2017-09-14 02:26:53 +02:00
committed by Daniel P. Berrange
parent cc82a94528
commit fc482fc868

View File

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