mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
get_profile(): get rid of profile_type
It's always set to 'INACTIVE_LOCAL' - no need to set and later check it. Also add a TODO note ;-)
This commit is contained in:
parent
f96304fe33
commit
4906bbf965
1 changed files with 2 additions and 4 deletions
|
@ -507,7 +507,6 @@ def get_profile(prof_name):
|
|||
uname = 'Inactive local profile for %s' % prof_name
|
||||
profile_hash = {
|
||||
uname: {
|
||||
'profile_type': 'INACTIVE_LOCAL',
|
||||
'profile': serialize_profile(inactive_profile[prof_name], prof_name, {}),
|
||||
'profile_data': inactive_profile,
|
||||
}
|
||||
|
@ -531,9 +530,8 @@ def get_profile(prof_name):
|
|||
pager = get_pager()
|
||||
subprocess.call([pager, orig_filename])
|
||||
elif ans == 'CMD_USE_PROFILE':
|
||||
if p['profile_type'] == 'INACTIVE_LOCAL':
|
||||
created.append(prof_name)
|
||||
return p['profile_data']
|
||||
created.append(prof_name)
|
||||
return p['profile_data']
|
||||
|
||||
return None # CMD_CREATE_PROFILE chosen
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue