[gnome-music/cherry-pick-ecad5bb8] application: Fix crash on opening help
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/cherry-pick-ecad5bb8] application: Fix crash on opening help
- Date: Fri, 21 Sep 2018 11:39:44 +0000 (UTC)
commit 8c32d777a292b1d2e5e9c29229f3187de0070176
Author: Shivansh Handa <avihs 29 gmail com>
Date: Fri Sep 14 16:01:00 2018 +0000
application: Fix crash on opening help
Music crashes when accessing help with yelp not installed.
Catch exception and log warning if help handler is not installed.
Fixes https://gitlab.gnome.org/GNOME/gnome-music/issues/220
(cherry picked from commit ecad5bb877ff5609ad72a3e79fe4f0cbc1363341)
gnomemusic/application.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 8e4b38cd..8a7041ea 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -31,6 +31,7 @@
# delete this exception statement from your version.
from gettext import gettext as _
+import logging
from gi.repository import Gtk, Gio, GLib, Gdk
@@ -84,7 +85,10 @@ class Application(Gtk.Application):
@log
def _help(self, action, param):
- Gtk.show_uri(None, "help:gnome-music", Gdk.CURRENT_TIME)
+ try:
+ Gtk.show_uri(None, "help:gnome-music", Gdk.CURRENT_TIME)
+ except GLib.Error:
+ logging.warning("Help handler not available.")
@log
def _about(self, action, param):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]