From 2616a9d4c1c3ebc4c7f7b235926b4bbf2c730194 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sat, 27 Aug 2016 21:47:40 +0800 Subject: [PATCH] Fix PyGI warnings - Partially addresses #893 --- src/bitmessageqt/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index b7fa2552..593a8b4b 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1,10 +1,13 @@ from debug import logger withMessagingMenu = False try: + import gi + gi.require_version('MessagingMenu', '1.0') from gi.repository import MessagingMenu + gi.require_version('Notify', '0.7') from gi.repository import Notify withMessagingMenu = True -except ImportError: +except (ImportError, ValueError): MessagingMenu = None try: