mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-26 10:03:54 +03:00
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:
parent
aec851f73a
commit
80c2dde350
12
virt-manager
12
virt-manager
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user