2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

Use extra_profiles.profile_exists()

... instead of accessing the internal storage directly.
This commit is contained in:
Christian Boltz
2024-11-07 19:32:49 +01:00
parent 3a02d6d14c
commit 0da12fe7cb

View File

@@ -432,7 +432,7 @@ def create_new_profile(localfile, is_stub=False):
def get_profile(prof_name):
"""search for inactive/extra profile, and ask if it should be used"""
if not extra_profiles.profiles.get(prof_name, False):
if not extra_profiles.profile_exists(prof_name):
return None # no inactive profile found
# TODO: search based on the attachment, not (only?) based on the profile name