mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
Merge common_test setup_aa(): drop try/except
... which only existed for historical reasons MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1389 Approved-by: Ryan Lee <rlee287@yahoo.com> Approved-by: Georgia Garcia <georgia.garcia@canonical.com> Merged-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
commit
a8b6c90d29
1 changed files with 4 additions and 8 deletions
|
@ -108,14 +108,10 @@ def setup_regex_tests(test_class):
|
|||
|
||||
def setup_aa(aa):
|
||||
confdir = os.getenv('__AA_CONFDIR')
|
||||
try:
|
||||
if confdir:
|
||||
aa.init_aa(confdir=confdir)
|
||||
else:
|
||||
aa.init_aa()
|
||||
except AttributeError:
|
||||
# apparmor.aa module versions <= 2.11 do not have the init_aa() method
|
||||
pass
|
||||
if confdir:
|
||||
aa.init_aa(confdir=confdir)
|
||||
else:
|
||||
aa.init_aa()
|
||||
|
||||
|
||||
def write_file(directory, file, contents):
|
||||
|
|
Loading…
Add table
Reference in a new issue