change_profile_flags: use ', ' as flags delimiter

This looks better than a comma without whitespace.

Also adjust minitools_test.py to follow this change.

(cherry picked from commit 4a021ec203)
This commit is contained in:
Christian Boltz 2018-07-25 21:33:22 +02:00
parent 267c18e725
commit f4c722c739
Failed to generate hash of commit
2 changed files with 2 additions and 2 deletions

View file

@ -627,7 +627,7 @@ def change_profile_flags(filename, program, flag, set_flag):
newflags = add_or_remove_flag(old_flags, flag, set_flag)
newflags = ','.join(newflags)
newflags = ', '.join(newflags)
set_profile_flags(filename, program, newflags)

View file

@ -89,7 +89,7 @@ class MinitoolsTest(AATest):
self.assertEqual(os.path.islink('%s/%s' % (force_complain_dir, os.path.basename(self.local_profilename))), True,
'Failed to create a symlink for %s in force-complain'%self.local_profilename)
self.assertEqual(apparmor.get_profile_flags(self.local_profilename, self.test_path), 'audit,complain',
self.assertEqual(apparmor.get_profile_flags(self.local_profilename, self.test_path), 'audit, complain',
'Complain flag could not be set in profile %s'%self.local_profilename)
#Remove complain flag first i.e. set to enforce mode