summaryrefslogtreecommitdiff
path: root/virt-manager
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2018-01-09 09:56:27 -0500
committerCole Robinson <crobinso@redhat.com>2018-01-09 09:57:20 -0500
commitab1b4f8628d3243e110993d13386069cca1d6606 (patch)
tree2f025b646212e1e27c2d29bec30e50726bd3ed96 /virt-manager
parent044d93d471f096c5ad08ea92d4cf6e81c7157624 (diff)
downloadvirt-manager-ab1b4f8628d3243e110993d13386069cca1d6606.tar.gz
virt-manager: Gracefully exit app on ctrl-c, not sys.exit
Will be needed for uitests coverage support
Diffstat (limited to 'virt-manager')
-rwxr-xr-xvirt-manager6
1 files changed, 3 insertions, 3 deletions
diff --git a/virt-manager b/virt-manager
index 4c05c1f8..4ba10fa5 100755
--- a/virt-manager
+++ b/virt-manager
@@ -272,17 +272,17 @@ def main():
LibvirtGLib.init(None)
LibvirtGLib.event_register()
+ engine = vmmEngine()
+
# Actually exit when we receive ctrl-c
from gi.repository import GLib
def _sigint_handler(user_data):
ignore = user_data
logging.debug("Received KeyboardInterrupt. Exiting application.")
- sys.exit(0)
+ engine.exit_app(None)
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT,
_sigint_handler, None)
- engine = vmmEngine()
-
engine.start(options.uri, show_window, domain, options.skip_autostart)