mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
Merge branch 'cboltz-double-read-inactive' into 'master'
Let read_inactive_profiles() do nothing when calling it the second time See merge request apparmor/apparmor!17 (cherry picked from commit794d1c4a07
)b307e535
Let read_inactive_profiles() do nothing when calling it the second time
This commit is contained in:
@@ -2226,6 +2226,13 @@ def read_profiles():
|
||||
read_profile(profile_dir + '/' + file, True)
|
||||
|
||||
def read_inactive_profiles():
|
||||
if hasattr(read_inactive_profiles, 'already_read'):
|
||||
# each autodep() run calls read_inactive_profiles, but that's a) superfluous and b) triggers a conflict because the inactive profiles are already loaded
|
||||
# therefore don't do anything if the inactive profiles were already loaded
|
||||
return
|
||||
|
||||
read_inactive_profiles.already_read = True
|
||||
|
||||
if not os.path.exists(extra_profile_dir):
|
||||
return None
|
||||
try:
|
||||
|
Reference in New Issue
Block a user