[PATCH 2/2] python: Fix detection of sepolicy.glade location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit c08cf24f3998 ("python: Remove dependency on the Python module
distutils") replace usage of distutils.sysconfig by sysconfig but it was
forgotten on the fact that the later provide a different api.

Fixes:
    self.code_path = sysconfig.get_python_lib(plat_specific=False) + "/sepolicy/"
                     ^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: module 'sysconfig' has no attribute 'get_python_lib'

Signed-off-by: Petr Lautrbach <lautrbach@xxxxxxxxxx>
---
 python/sepolicy/sepolicy/gui.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
index 53f3c6148b58..04208049360d 100644
--- a/python/sepolicy/sepolicy/gui.py
+++ b/python/sepolicy/sepolicy/gui.py
@@ -130,7 +130,7 @@ class SELinuxGui():
         self.application = app
         self.filter_txt = ""
         builder = Gtk.Builder()  # BUILDER OBJ
-        self.code_path = sysconfig.get_python_lib(plat_specific=False) + "/sepolicy/"
+        self.code_path = sysconfig.get_path('purelib', vars={'base': "/usr"}) + "/sepolicy/"
         glade_file = self.code_path + "sepolicy.glade"
         builder.add_from_file(glade_file)
         self.outer_notebook = builder.get_object("outer_notebook")
-- 
2.38.1




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux