virt-manager/cde2f0ef-Suppress-gi-warnings-about-lack-of-require_version.patch
Charles Arnold 10d2977e4e - bsc#Bug 952241 - virt-manager: LibvirtGLib was imported without
specifying a version first.
  cde2f0ef-Suppress-gi-warnings-about-lack-of-require_version.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=278
2015-10-27 19:48:08 +00:00

32 lines
826 B
Diff

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