diff mbox

[1/2] policycoreutils: Force GTK3.0 for sepolicy gui

Message ID 20161112202021.4469-1-bigon@debian.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Laurent Bigonville Nov. 12, 2016, 8:20 p.m. UTC
From: Laurent Bigonville <bigon@bigon.be>

This removes the following warning when running sepolicy gui command:

/usr/lib/python3/dist-packages/sepolicy/gui.py:29: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.

Signed-off-by: Laurent Bigonville <bigon@bigon.be>
---
 policycoreutils/sepolicy/sepolicy/gui.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/policycoreutils/sepolicy/sepolicy/gui.py b/policycoreutils/sepolicy/sepolicy/gui.py
index 7f1888c..ee78e0c 100644
--- a/policycoreutils/sepolicy/sepolicy/gui.py
+++ b/policycoreutils/sepolicy/sepolicy/gui.py
@@ -26,6 +26,8 @@ 
 #
 #
 
+import gi
+gi.require_version('Gtk', '3.0')
 from gi.repository import Gtk
 from gi.repository import Gdk
 from gi.repository import GLib