mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01: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
This commit is contained in:
commit
794d1c4a07
1 changed files with 7 additions and 0 deletions
|
@ -2024,6 +2024,13 @@ def read_profiles():
|
||||||
read_profile(profile_dir + '/' + file, True)
|
read_profile(profile_dir + '/' + file, True)
|
||||||
|
|
||||||
def read_inactive_profiles():
|
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):
|
if not os.path.exists(extra_profile_dir):
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue