Specify library version prior to import, fixes #4900

Gi has been emitting warnings into the log to do this for some
time now. Not doing this has also caused bugs, such as #4900.
This commit is contained in:
Sam Parkinson 2015-10-31 14:44:46 +11:00
parent ec7f723819
commit aea65408f0
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,8 @@ import logging
import os import os
from ConfigParser import ConfigParser from ConfigParser import ConfigParser
import gi
gi.require_version('Rsvg', '2.0')
from gi.repository import GObject from gi.repository import GObject
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk

View File

@ -21,6 +21,8 @@ UNSTABLE.
import logging import logging
import time import time
import gi
gi.require_version('Atspi', '2.0')
from gi.repository import Atspi from gi.repository import Atspi
from gi.repository import GLib from gi.repository import GLib