diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index 159a9b9ce..fed7327b9 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -1476,7 +1476,7 @@ def do_logprof_pass(logmark=''): def save_profiles(): # Ensure the changed profiles are actual active profiles for prof_name in changed.keys(): - if not is_active_profile(prof_name): + if not aa.get(prof_name, False): print("*** save_profiles(): removing %s" % prof_name) print('*** This should not happen. Please open a bugreport!') changed.pop(prof_name) @@ -2151,12 +2151,6 @@ def separate_vars(vs): return data -def is_active_profile(pname): - if aa.get(pname, False): - return True - else: - return False - def store_list_var(var, list_var, value, var_operation, filename): """Store(add new variable or add values to variable) the variables encountered in the given list_var - the 'var' parameter will be modified