diff --git a/utils/apparmor/tools.py b/utils/apparmor/tools.py index 9dbf9adab..cfa3e29a7 100644 --- a/utils/apparmor/tools.py +++ b/utils/apparmor/tools.py @@ -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 diff --git a/utils/test/test-aa.py b/utils/test/test-aa.py index 19308622d..821c58f25 100644 --- a/utils/test/test-aa.py +++ b/utils/test/test-aa.py @@ -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 diff --git a/utils/test/test-parser-simple-tests.py b/utils/test/test-parser-simple-tests.py index e0bb1f832..901b41cfb 100644 --- a/utils/test/test-parser-simple-tests.py +++ b/utils/test/test-parser-simple-tests.py @@ -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: