[PATCH v2 4/6] libvirtaio: fix closing of the objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- 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@xxxxxxxxxxxxxxxxxxxxxx>
---
 libvirtaio.py | 7 +------
 1 file changed, 1 insertion(+), 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
-- 
2.9.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux