tags 854405 + patch
kthxbye

The attached patch fixes the issue.

Cheers,
sur5r

-- 
ceterum censeo microsoftem esse delendam.
From ceb2bfc8a04f2cde76dfdd17d0a01a8aa58e21cc Mon Sep 17 00:00:00 2001
From: Jakob Haufe <su...@sur5r.net>
Date: Thu, 9 Feb 2017 22:46:32 +0100
Subject: [PATCH] Catch ValueError (Closes: #854405)

gi.require_version raises ValueError if it can't find a module. Catching
it allows for successful fallback to text mode in case gir1.2-vte is not
available.
---
 reportbug/ui/gtk2_ui.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index f60a1eb..2be0e9b 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -1777,7 +1777,7 @@ def initialize():
     try:
         gi.require_version('Vte', '2.91')
         from gi.repository import Vte
-    except ImportError:
+    except (ImportError,ValueError):
         message = """Please install the %s package to use the GTK+(known as 'gtk2' in reportbug) interface.
 Falling back to 'text' interface."""
         dialog = Gtk.MessageDialog(None, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
-- 
2.11.0

Attachment: pgpeh7YW44ms4.pgp
Description: OpenPGP digital signature

Reply via email to