[virt-tools-list] [virt-manager][PATCH 1/2] virt-manager: Code cleanup

Leonardo Garcia lagarcia at linux.vnet.ibm.com
Sat Jul 13 02:10:15 UTC 2013


From: Leonardo Garcia <lagarcia at br.ibm.com>

Remove functions not necessary or not being used anywhere.
---
 virt-manager          |   13 ++-----------
 virtManager/engine.py |    3 ---
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/virt-manager b/virt-manager
index e8ef5b3..7baf604 100755
--- a/virt-manager
+++ b/virt-manager
@@ -162,15 +162,6 @@ def launch_specific_window(engine, show, uri, uuid):
         engine.show_host_summary(uri)
 
 
-def _conn_ready(conn, engine, show, uri, uuid):
-    if uuid not in conn.vms:
-        engine.err.show_err("%s does not have VM with UUID %s" %
-                            (uri, uuid))
-    else:
-        launch_specific_window(engine, show, uri, uuid)
-    return True
-
-
 def opt_show_cb(option, opt_str, value, parser):
     # Generic OptionParser callback for all --show-* options
     # This routine stores UUID to options.uuid for all --show-* options
@@ -286,8 +277,8 @@ def main():
 
     if options.show:
         def cb(conn):
-            return _conn_ready(conn, engine, options.show,
-                               options.uri, options.uuid)
+            launch_specific_window(engine, options.show, options.uri, options.uuid)
+            return True
         engine.uri_cb = cb
         engine.show_manager_window = False
 
diff --git a/virtManager/engine.py b/virtManager/engine.py
index 41f4aca..ee6ce49 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -744,9 +744,6 @@ class vmmEngine(vmmGObject):
     def show_manager(self):
         self._do_show_manager(None)
 
-    def show_connect(self):
-        self._do_show_connect(self.get_manager())
-
     def show_host_summary(self, uri):
         self._do_show_host(self.get_manager(), uri)
 
-- 
1.7.1




More information about the virt-tools-list mailing list