Commit 6bb686f5 authored by Vadim Rutkovsky's avatar Vadim Rutkovsky

Quit GTK if unhandled exception occurs

parent 9bf9db4d
#!/usr/bin/env python3
import sys, signal
from gi.repository import Gio
from gi.repository import Gio, Gtk
sys.path.insert(1, '@pythondir@')
from gnomemusic.application import Application
def install_excepthook():
""" Make sure we exit when an unhandled exception occurs. """
old_hook = sys.excepthook
def new_hook(etype, evalue, etb):
old_hook(etype, evalue, etb)
while Gtk.main_level():
sys.excepthook = new_hook
if __name__ == "__main__":
# We use our own, so let gi.repository find it
from gi.repository import GIRepository
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment