mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
import is_skippable_file from apparmor.common
... instead of indirectly using it via apparmor.aa
This commit is contained in:
@@ -17,7 +17,7 @@ import sys
|
||||
|
||||
import apparmor.aa as apparmor
|
||||
import apparmor.ui as aaui
|
||||
from apparmor.common import AppArmorException, cmd, user_perm
|
||||
from apparmor.common import AppArmorException, cmd, is_skippable_file, user_perm
|
||||
|
||||
# setup module translations
|
||||
from apparmor.translations import init_translation
|
||||
@@ -111,7 +111,7 @@ class aa_tools:
|
||||
|
||||
output_name = profile if program is None else program
|
||||
|
||||
if not os.path.isfile(profile) or apparmor.is_skippable_file(profile):
|
||||
if not os.path.isfile(profile) or is_skippable_file(profile):
|
||||
aaui.UI_Info(_('Profile for %s not found, skipping') % output_name)
|
||||
continue
|
||||
|
||||
@@ -127,7 +127,7 @@ class aa_tools:
|
||||
|
||||
output_name = profile if program is None else program
|
||||
|
||||
if not os.path.isfile(profile) or apparmor.is_skippable_file(profile):
|
||||
if not os.path.isfile(profile) or is_skippable_file(profile):
|
||||
aaui.UI_Info(_('Profile for %s not found, skipping') % output_name)
|
||||
continue
|
||||
|
||||
@@ -142,7 +142,7 @@ class aa_tools:
|
||||
|
||||
output_name = profile if program is None else program
|
||||
|
||||
if not os.path.isfile(profile) or apparmor.is_skippable_file(profile):
|
||||
if not os.path.isfile(profile) or is_skippable_file(profile):
|
||||
aaui.UI_Info(_('Profile for %s not found, skipping') % output_name)
|
||||
continue
|
||||
|
||||
@@ -157,7 +157,7 @@ class aa_tools:
|
||||
|
||||
output_name = profile if program is None else program
|
||||
|
||||
if not os.path.isfile(profile) or apparmor.is_skippable_file(profile):
|
||||
if not os.path.isfile(profile) or is_skippable_file(profile):
|
||||
aaui.UI_Info(_('Profile for %s not found, skipping') % output_name)
|
||||
continue
|
||||
|
||||
|
@@ -19,11 +19,11 @@ import sys
|
||||
|
||||
import apparmor.aa # needed to set global vars in some tests
|
||||
from apparmor.aa import (check_for_apparmor, get_output, get_reqs, get_interpreter_and_abstraction, create_new_profile,
|
||||
get_profile_flags, change_profile_flags, set_options_audit_mode, set_options_owner_mode, is_skippable_file,
|
||||
get_profile_flags, change_profile_flags, set_options_audit_mode, set_options_owner_mode,
|
||||
parse_profile_data,
|
||||
get_file_perms, propose_file_rules, merged_to_split, split_to_merged)
|
||||
from apparmor.aare import AARE
|
||||
from apparmor.common import AppArmorException, AppArmorBug
|
||||
from apparmor.common import AppArmorException, AppArmorBug, is_skippable_file
|
||||
from apparmor.rule.file import FileRule
|
||||
from apparmor.rule.include import IncludeRule
|
||||
|
||||
|
@@ -14,7 +14,7 @@ from common_test import AATest, setup_all_loops, setup_aa
|
||||
import apparmor.aa as apparmor
|
||||
|
||||
import os
|
||||
from apparmor.common import open_file_read, AppArmorException
|
||||
from apparmor.common import open_file_read, AppArmorException, is_skippable_file
|
||||
|
||||
# This testcase will parse all parser/tst/simple_tests with parse_profile_data(),
|
||||
# except the files listed in one of the arrays below.
|
||||
@@ -528,7 +528,7 @@ def find_and_setup_test_profiles(profile_dir):
|
||||
|
||||
for file in files:
|
||||
file_with_path = os.path.join(root, file)
|
||||
if not apparmor.is_skippable_file(file) and relpath != '.':
|
||||
if not is_skippable_file(file) and relpath != '.':
|
||||
skipped += parse_test_profiles(file_with_path)
|
||||
|
||||
if skipped:
|
||||
|
Reference in New Issue
Block a user