2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-04 08:15:21 +00:00

aa.py: Indicate permission error if log file is found but cannot be opened

This commit is contained in:
Otto Kekäläinen
2019-04-21 11:36:15 +03:00
parent 455c441357
commit 3c7e1668bd

View File

@@ -1770,9 +1770,9 @@ def set_logfile(filename):
if not os.path.exists(logfile): if not os.path.exists(logfile):
if filename: if filename:
raise AppArmorException(_('The logfile %s does not exist. Please check the path') % logfile) raise AppArmorException(_('The logfile %s does not exist. Please check the path.') % logfile)
else: else:
raise AppArmorException('Can\'t find system log "%s".' % (logfile)) raise AppArmorException('Can\'t find system log "%s". Please check permissions.' % (logfile))
elif os.path.isdir(logfile): elif os.path.isdir(logfile):
raise AppArmorException(_('%s is a directory. Please specify a file as logfile') % logfile) raise AppArmorException(_('%s is a directory. Please specify a file as logfile') % logfile)