Catch NotADirectoryError to fix selinux error
Fixes
@@ -157,7 +157,7 @@ def restore_selinux_contexts():
'''
try:
subprocess.check_call(['selinuxenabled'])
- except (FileNotFoundError, PermissionError, subprocess.CalledProcessError):
+ except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError):
# If we don't have selinux or selinuxenabled returned 1, failure
# is ignored quietly.
return
