From f24967ad129498678014745ea0c90afb68082353 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 27 Aug 2019 13:40:07 +1000 Subject: [PATCH] gui: require pygi version 3.30 This was the one that introduced the Gtk.Template class that we use. And better to have a meaningful exit than a crash. Fixes #197 Signed-off-by: Peter Hutterer --- tuhi-gui.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tuhi-gui.in b/tuhi-gui.in index 6844826..3950364 100755 --- a/tuhi-gui.in +++ b/tuhi-gui.in @@ -5,6 +5,13 @@ import sys import os from pathlib import Path +try: + # 3.30 is the first one with Gtk.Template + gi.check_version('3.30') # NOQA +except ValueError as e: + print(e, file=sys.stderr) + sys.exit(1) + gi.require_version('Gio', '2.0') # NOQA gi.require_version('Gtk', '3.0') # NOQA from gi.repository import Gio, Gtk, Gdk