mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
read_profile(): don't fail silently
If a profile file can't be read, print a warning so that the user is aware of the problem.
This commit is contained in:
@@ -1688,7 +1688,8 @@ def read_profile(file, active_profile):
|
||||
try:
|
||||
with open_file_read(file) as f_in:
|
||||
data = f_in.readlines()
|
||||
except IOError:
|
||||
except IOError as e:
|
||||
aaui.UI_Important('WARNING: Error reading file %s, skipping.\n %s' % (file, e))
|
||||
debug_logger.debug("read_profile: can't read %s - skipping" % file)
|
||||
return None
|
||||
|
||||
|
Reference in New Issue
Block a user