[virt-tools-list] [PATCH python] storagelist: code cleanup

Jovanka Gulicoska jovanka.gulicoska at gmail.com
Tue Jun 14 21:56:06 UTC 2016


Remove cb() function calling pool.refresh, instead use pool.refresh
in vmmAsyncJob
---
 virtManager/storagelist.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/virtManager/storagelist.py b/virtManager/storagelist.py
index 8a34e7f..c16cf5c 100644
--- a/virtManager/storagelist.py
+++ b/virtManager/storagelist.py
@@ -654,11 +654,8 @@ class vmmStorageList(vmmGObjectUI):
         if pool is None:
             return
 
-        def cb():
-            pool.refresh()
-
         logging.debug("Refresh pool '%s'", pool.get_name())
-        vmmAsyncJob.simple_async_noshow(cb, [], self,
+        vmmAsyncJob.simple_async_noshow(pool.refresh, [], self,
                             _("Error refreshing pool '%s'") % pool.get_name())
 
     def _pool_apply(self):
-- 
2.5.5




More information about the virt-tools-list mailing list