Skip to content
Snippets Groups Projects
Commit 629d3d92 authored by Simon McVittie's avatar Simon McVittie
Browse files

session-lockdown-no-deny: only ignore FileNotFoundError


If we fail to read the AppArmor profile or other required information
due to a time-of-check/time-of-use difference (the process exits)
then that's fine. Otherwise, it's a problem and we should fail,
although we might as well continue testing and get more complete
results.

Reviewed-by: default avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D3770
parent 24b4df33
No related branches found
No related tags found
No related merge requests found
...@@ -103,8 +103,11 @@ def get_processes(profiles): ...@@ -103,8 +103,11 @@ def get_processes(profiles):
else: else:
not_ok('process {} {!r} context {!r} could not be ' not_ok('process {} {!r} context {!r} could not be '
'parsed'.format(filename, exe, p)) 'parsed'.format(filename, exe, p))
except: except FileNotFoundError:
# probably the process exited after the listdir()
pass pass
except Exception as e:
not_ok(str(e))
return processes return processes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment