[apparmor] [patch] [02/38] check_and_split_list: optionally allow empty list

Seth Arnold seth.arnold at canonical.com
Wed Sep 14 19:35:15 UTC 2016


On Wed, Sep 14, 2016 at 04:32:16PM +0200, Christian Boltz wrote:
> So a string also gets wrapped into a set (not a list) ;-)
> (don't worry about getting it wrong - I also have to ask type() how an 
> array is named ;-)

Ah! this was the core of my confusion. I hadn't realized sets are
first-class language objects. So much to learn.

> > How should an empty string be treated?
> 
> It will error out here (for empty string and whitespace-only string):
> 
>     for item in result_list: 
>         if not item.strip():
>             raise AppArmorBug('Passed empty %(keyword_name)s to %(classname)s' %
>                     {'keyword_name': keyword_name, 'classname': classname})

Aha, good good.


Thanks :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160914/5149652c/attachment.pgp>


More information about the AppArmor mailing list