That already explains it - the regex doesn't match the "(-)", but the code expects that the regex always matches ;-)
Can you edit aa-status a bit? Search for (should be line 148)
match = re.search("^([^\(]+)\s+\((\w+)\)$", p)
and replace it with
match = re.search("^([^\(]+)\s+\((\w+|-)\)$", p)
(the added part is the "|-" near the end of the regex)
This should prevent the crash.
The interesting question is how aa-status will behave because it only expects "enforce" and "complain", but not "-". From a quick look at the code, I don't expect serious problems - but it might look like it can't count (I wouldn't be surprised if it will say "1 profile loaded" and then print an empty list of profiles).
That already explains it - the regex doesn't match the "(-)", but the code expects that the regex always matches ;-)
Can you edit aa-status a bit? Search for (should be line 148) "^([^\( ]+)\s+\ ((\w+)\ )$", p) "^([^\( ]+)\s+\ ((\w+|- )\)$", p)
match = re.search(
and replace it with
match = re.search(
(the added part is the "|-" near the end of the regex)
This should prevent the crash.
The interesting question is how aa-status will behave because it only expects "enforce" and "complain", but not "-". From a quick look at the code, I don't expect serious problems - but it might look like it can't count (I wouldn't be surprised if it will say "1 profile loaded" and then print an empty list of profiles).