mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
Drop is_active_profile()
... and inline it at the only place that uses it
This commit is contained in:
parent
13bea6f4a7
commit
710d5ae466
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue