From 0d1023d4968eb2f95e0af4c605d0a74c09959a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 28 Aug 2015 02:02:19 +0200 Subject: [PATCH] qubes-desktop-run: don't crash on Debian wheezy (glib < 2.36) Gio.DesktopAppInfo.get_boolean was introduced in glib 2.36. Instead of crashing simply do not support DBusActivatable there. There is no such application in default Debian wheezy template anyway. (cherry picked from commit 0b7ade11b868babe44c73e1a502cdd44487abac9) --- misc/xdg.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/misc/xdg.py b/misc/xdg.py index c070077..205602f 100755 --- a/misc/xdg.py +++ b/misc/xdg.py @@ -6,13 +6,14 @@ import dbus def launch(desktop, *files): launcher = Gio.DesktopAppInfo.new_from_filename(desktop) - activatable = launcher.get_boolean('DBusActivatable') - if activatable: - bus = dbus.SessionBus() - service_id = launcher.get_id() - # cut the .desktop suffix - service_id = service_id[:-8] - bus.start_service_by_name(service_id) + if hasattr(launcher, 'get_boolean'): + activatable = launcher.get_boolean('DBusActivatable') + if activatable: + bus = dbus.SessionBus() + service_id = launcher.get_id() + # cut the .desktop suffix + service_id = service_id[:-8] + bus.start_service_by_name(service_id) launcher.launch(files, None) if __name__ == "__main__":