2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Merge branch 'cboltz-fail-verbose' into 'master'

read_profile(): don't fail silently

See merge request apparmor/apparmor!530

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..master
This commit is contained in:
Christian Boltz
2020-05-12 19:43:44 +00:00

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