pylint: Another fix for gtk3 version detection
We need to place require_version calls earlier and before any code that might import Gtk/Gdk Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
99a2818d0e
commit
a8e978dd38
|
@ -1,2 +1,7 @@
|
|||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gdk", "3.0")
|
||||
gi.require_version("Gtk", "3.0")
|
||||
|
|
|
@ -13,6 +13,8 @@ import sys
|
|||
import traceback
|
||||
|
||||
import gi
|
||||
gi.require_version("Gdk", "3.0")
|
||||
gi.require_version("Gtk", "3.0")
|
||||
gi.require_version('LibvirtGLib', '1.0')
|
||||
from gi.repository import LibvirtGLib
|
||||
|
||||
|
@ -59,7 +61,6 @@ def _import_gtk(leftovers):
|
|||
origargv = sys.argv
|
||||
try:
|
||||
sys.argv = origargv[:1] + leftovers[:]
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
leftovers = sys.argv[1:]
|
||||
|
||||
|
|
Loading…
Reference in New Issue