Fedora 18 backport - GLib does not have unix_signal_add

This commit is contained in:
James Cameron 2018-11-19 14:12:51 +11:00
parent 85fc4680e9
commit 87fcfb62e4

View File

@ -316,7 +316,9 @@ class Activity(Window, Gtk.Container):
}
def __init__(self, handle, create_jobject=True):
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self.close)
if hasattr(GLib, 'unix_signal_add'):
GLib.unix_signal_add(
GLib.PRIORITY_DEFAULT, signal.SIGINT, self.close)
# Stuff that needs to be done early
icons_path = os.path.join(get_bundle_path(), 'icons')