summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-09-06 01:36:17 -0700
committerNirbheek Chauhan <nirbheek@centricular.com>2022-10-01 12:46:59 +0530
commit2e5e7127cc757257fe1b3c7ac558f401699143c2 (patch)
tree60f0ca67ab304b3f24b95ed069ddc848c13c884c
parentfeeb984f674e967cd3d0b2ab6082d1ed33515a8f (diff)
downloadmeson-2e5e7127cc757257fe1b3c7ac558f401699143c2.tar.gz
minstall: handle extra error for selinuxenabled
Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
-rw-r--r--mesonbuild/minstall.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index a810ccbbd..69763fa49 100644
--- a/mesonbuild/minstall.py
+++ b/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