mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
utils: test: test-aa-notify: Ensure aanotify_bin is always a list
os.environ returns a string, but the default value is a list, and the concatenation of __AA_CONFDIR assumes a list. Thus, if APPARMOR_NOTIFY and __AA_CONFDIR were both specified, this would error out. Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
parent
1462e1c4b0
commit
3365e492a7
1 changed files with 1 additions and 1 deletions
|
@ -602,7 +602,7 @@ setup_aa(aa) # Wrapper for aa.init_aa()
|
|||
setup_all_loops(__name__)
|
||||
if __name__ == '__main__':
|
||||
if 'APPARMOR_NOTIFY' in os.environ:
|
||||
aanotify_bin = os.environ['APPARMOR_NOTIFY']
|
||||
aanotify_bin = [os.environ['APPARMOR_NOTIFY']]
|
||||
|
||||
if '__AA_CONFDIR' in os.environ:
|
||||
aanotify_bin = aanotify_bin + ['--configdir', os.getenv('__AA_CONFDIR')]
|
||||
|
|
Loading…
Add table
Reference in a new issue