[Reportbug-commits] [reportbug] 05/09: Catch ValueError (Closes: #854405)
Sandro Tosi
morph at moszumanska.debian.org
Sun Feb 12 17:13:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit 1af6d41dad6c15175672e829d1191ac1d0549a0a
Author: Jakob Haufe <sur5r at sur5r.net>
Date: Thu Feb 9 22:46:32 2017 +0100
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 5395c4b..31d12c9 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -1781,7 +1781,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,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list