Skip to content

Commit 5f2e3f4

Browse files
committed
bin/meld: Use gi.require correctly
1 parent 7682c9d commit 5f2e3f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bin/meld

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def check_requirements():
158158
try:
159159
# FIXME: Extra clause for gi
160160
import gi
161-
from gi.repository import Gtk
162161
gi.require_version("Gtk", "3.0")
162+
from gi.repository import Gtk
163163
version = (Gtk.get_major_version(), Gtk.get_minor_version())
164164
assert version >= gtk_requirement
165165
except (ImportError, AssertionError) as e:
@@ -172,6 +172,7 @@ def check_requirements():
172172
missing_reqs("GLib", glib_requirement, e)
173173

174174
try:
175+
gi.require_version('GtkSource', '3.0')
175176
from gi.repository import GtkSource
176177
# TODO: There is no way to get at GtkSourceView's actual version
177178
assert hasattr(GtkSource, 'SearchSettings')

0 commit comments

Comments
 (0)