Some bugfix (#516)

* Some bugfix

* Update apparmor.py

* Update apparmor.py

* Update apparmor.py

* Update apparmor.py
This commit is contained in:
Pascal Vizeli
2018-06-20 23:25:08 +02:00
committed by GitHub
parent f48182a69c
commit 9aa5eda2c8
3 changed files with 6 additions and 6 deletions

View File

@@ -14,8 +14,8 @@ def get_profile_name(profile_file):
profiles = set()
try:
with profile_file.open('r') as profile:
for line in profile:
with profile_file.open('r') as profile_data:
for line in profile_data:
match = RE_PROFILE.match(line)
if not match:
continue
@@ -31,14 +31,14 @@ def get_profile_name(profile_file):
return profiles.pop()
def validate_profile(profile_file, profile_name):
def validate_profile(profile_name, profile_file):
"""Check if profile from file is valid with profile name."""
if profile_name == get_profile_name(profile_file):
return True
return False
def adjust_profile(profile_file, profile_name, profile_new):
def adjust_profile(profile_name, profile_file, profile_new):
"""Fix the profile name."""
org_profile = get_profile_name(profile_file)
profile_data = []