2
0
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:
Christian Boltz
2020-05-11 22:20:03 +02:00
parent da2ce3ac67
commit af8b9dc5bb

View File

@@ -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