[apparmor] [patch] Fix parsing of boolean assignments
Christian Boltz
apparmor at cboltz.de
Sun Jul 5 12:31:28 UTC 2015
Hello,
parsing of boolean assignments failed with
TypeError: '_sre.SRE_Match' object is not subscriptable
because of a missing ".groups()"
I propose this patch for trunk and 2.9.
[ 62-fix-parse-boolean.diff ]
=== modified file utils/apparmor/aa.py
--- utils/apparmor/aa.py 2015-07-04 18:54:45.053571812 +0200
+++ utils/apparmor/aa.py 2015-07-05 14:13:39.207629847 +0200
@@ -2692,7 +2692,7 @@
profile_data[profile][hat]['rlimit'].add(RlimitRule.parse(line))
elif RE_PROFILE_BOOLEAN.search(line):
- matches = RE_PROFILE_BOOLEAN.search(line)
+ matches = RE_PROFILE_BOOLEAN.search(line).groups()
if not profile:
raise AppArmorException(_('Syntax Error: Unexpected boolean definition found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
Regards,
Christian Boltz
--
Schau mal ins Listenarchiv und versuch mal, Bernds Antworten zu
zählen - und dann schreib das noch mal. Jetzt hast du wirklich dem
Falschen ans Bein gepinkelt! [Jan Trippler in suse-linux]
More information about the AppArmor
mailing list