virt-manager: Fix connection to domain from cli

Need to tweak our signal handling here with the recent connection changes.
This commit is contained in:
Cole Robinson 2015-04-12 09:34:55 -04:00
parent aec851f73a
commit 80c2dde350
2 changed files with 10 additions and 4 deletions

View File

@ -264,9 +264,15 @@ def main():
if show:
def cb(conn):
ignore = conn
launch_specific_window(engine, show, options.uri, options.uuid)
return True
if conn.is_disconnected():
# Connection error
return True
if conn.is_active():
launch_specific_window(engine, show, options.uri, options.uuid)
return True
return False
engine.uri_cb = cb
engine.show_manager_window = False
engine.skip_autostart = True

View File

@ -135,7 +135,7 @@ class vmmEngine(vmmGObject):
conn = self.make_conn(self.uri_at_startup)
self.register_conn(conn, skip_config=True)
if conn and self.uri_cb:
conn.connect_opt_out("resources-sampled", self.uri_cb)
conn.connect_opt_out("state-changed", self.uri_cb)
self.connect_to_uri(self.uri_at_startup)