[meld/meld-3-18] meld: Also catch ValueError, raised by gi.require_version()



commit 5e30847aa777adace67a83b4a8db17229fa8dc1b
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Thu Oct 26 06:52:51 2017 +1000

    meld: Also catch ValueError, raised by gi.require_version()

 bin/meld |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 0c85f6a..bdf9637 100755
--- a/bin/meld
+++ b/bin/meld
@@ -193,13 +193,13 @@ def check_requirements():
         from gi.repository import Gtk
         version = (Gtk.get_major_version(), Gtk.get_minor_version())
         assert version >= gtk_requirement
-    except (ImportError, AssertionError) as e:
+    except (ImportError, AssertionError, ValueError) as e:
         missing_reqs("GTK+", gtk_requirement, e)
 
     try:
         from gi.repository import GObject
         assert GObject.glib_version >= glib_requirement
-    except (ImportError, AssertionError) as e:
+    except (ImportError, AssertionError, ValueError) as e:
         missing_reqs("GLib", glib_requirement, e)
 
     try:
@@ -207,7 +207,7 @@ def check_requirements():
         from gi.repository import GtkSource
         # TODO: There is no way to get at GtkSourceView's actual version
         assert hasattr(GtkSource, 'SearchSettings')
-    except (ImportError, AssertionError) as e:
+    except (ImportError, AssertionError, ValueError) as e:
         missing_reqs("GtkSourceView", gtksourceview_requirement, e)
 
     try:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]