mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-21 16:59:25 +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:
committed by
Daniel P. Berrange
parent
cc82a94528
commit
fc482fc868
@ -154,11 +154,6 @@ class Descriptor(object):
|
|||||||
self.update()
|
self.update()
|
||||||
return callback
|
return callback
|
||||||
|
|
||||||
def close(self):
|
|
||||||
''''''
|
|
||||||
self.callbacks.clear()
|
|
||||||
self.update()
|
|
||||||
|
|
||||||
class DescriptorDict(dict):
|
class DescriptorDict(dict):
|
||||||
'''Descriptors collection
|
'''Descriptors collection
|
||||||
|
|
||||||
@ -249,8 +244,8 @@ class TimeoutCallback(Callback):
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
'''Stop the timer and call ff callback'''
|
'''Stop the timer and call ff callback'''
|
||||||
super(TimeoutCallback, self).close()
|
|
||||||
self.update(timeout=-1)
|
self.update(timeout=-1)
|
||||||
|
super(TimeoutCallback, self).close()
|
||||||
|
|
||||||
#
|
#
|
||||||
# main implementation
|
# main implementation
|
||||||
|
Reference in New Issue
Block a user