Skip to content

Commit

Permalink
more elaborate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
br-olf committed Mar 15, 2023
1 parent 1e24a4d commit 6d0bc54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion selinux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def add_location(location):

def get_system_sitepackages():
"""Get sitepackage locations from system python"""
system_python = sys.executable
# Do not ever use sys.executable here
# See https://github.com/pycontribs/selinux/issues/17 for details
system_python = "/usr/bin/python%s" % ".".join(
[str(item) for item in platform.python_version_tuple()[0:2]]
)

system_sitepackages = json.loads(
subprocess.check_output(
Expand Down

0 comments on commit 6d0bc54

Please sign in to comment.