virt-manager/cde2f0ef-Suppress-gi-warnings-about-lack-of-require_version.patch

32 lines
826 B
Diff
Raw Normal View History

Subject: Suppress gi warnings about lack of require_version
From: Cole Robinson crobinso@redhat.com Thu Sep 3 17:31:43 2015 -0400
Date: Thu Sep 3 17:31:43 2015 -0400:
Git: cde2f0ef676583d2bedf75b3717cdf97a74ba837
diff --git a/virt-manager b/virt-manager
index 2f501e4..0a9d4b4 100755
--- a/virt-manager
+++ b/virt-manager
@@ -28,6 +28,7 @@ import traceback
import gi
from gi.repository import GObject
+gi.require_version('LibvirtGLib', '1.0')
from gi.repository import LibvirtGLib
from virtinst import util as util
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index b70d387..085b27a 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -23,6 +23,8 @@ import datetime
import logging
import re
+import gi
+gi.require_version('Libosinfo', '1.0')
from gi.repository import Libosinfo as libosinfo