diff options
author | Wojtek Porczyk <woju@invisiblethingslab.com> | 2017-09-14 02:26:53 +0200 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-09-26 11:01:33 +0100 |
commit | fc482fc8688e9ba25ee19f34e5a692504ec85da3 (patch) | |
tree | f7cfb53796d6f41afb9bc89a0a1b04083936ce29 /libvirtaio.py | |
parent | cc82a945286f011a465787b0fe998b396169fb18 (diff) | |
download | libvirt-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.py | 7 |
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 |