From c54f381737e8e1dc018aa80542f3d095189afdae Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Wed, 16 Oct 2019 18:23:21 -0500 Subject: [PATCH] Fix Gramps -v error when Gtk is not present (#923) Via email a user noted a bug when "Gramps -v" was used with Gtk not installed (and gi was). When the "gi.require_version('Gtk', '3.0')" was added during Gramps 5.0.0 timeframe, a corresponding exception was not. --- gramps/grampsapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/grampsapp.py b/gramps/grampsapp.py index df9765ef7..2f0dac5a5 100644 --- a/gramps/grampsapp.py +++ b/gramps/grampsapp.py @@ -212,7 +212,7 @@ def show_settings(): Gtk.get_minor_version(), Gtk.get_micro_version()) except: # any failure to 'get' the version gtkver_str = 'unknown version' - except ImportError: + except (ImportError, ValueError): gtkver_str = 'not found' # no DISPLAY is a RuntimeError in an older pygtk (e.g. 2.17 in Fedora 14) except RuntimeError: