minstall: handle extra error for selinuxenabled

Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
pull/10790/head
Rosen Penev 2 years ago committed by Xavier Claessens
parent a289e5416b
commit 26acf2152d
  1. 2
      mesonbuild/minstall.py

@ -235,7 +235,7 @@ def restore_selinux_contexts() -> None:
'''
try:
subprocess.check_call(['selinuxenabled'])
except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError):
except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError):
# If we don't have selinux or selinuxenabled returned 1, failure
# is ignored quietly.
return

Loading…
Cancel
Save