[apparmor] [patch] [03/38] check_and_split_list(): allow 'lst' parameter to be a set

Kshitij Gupta kgupta8592 at gmail.com
Sun Sep 11 20:38:21 UTC 2016


On Sat, Aug 13, 2016 at 2:15 AM, Christian Boltz <apparmor at cboltz.de> wrote:
> Hello,
>
> list, tuple, set - does python offer even more array types? ;-)
depends on what all modules you're yet to import [e.g. numpy] ;-)
>
>
> [ 03-check_and_split_list-also-accept-set.diff ]
>
> --- utils/apparmor/rule/__init__.py     2016-01-16 21:02:23.414845325 +0100
> +++ utils/apparmor/rule/__init__.py     2016-01-18 18:56:44.740261951 +0100
> @@ -438,7 +438,7 @@
>          return None, True, None
>      elif type_is_str(lst):
>          result_list = {lst}
> -    elif (type(lst) == list or type(lst) == tuple) and (len(lst) > 0 or allow_empty_list):
> +    elif type(lst) in [list, tuple, set] and (len(lst) > 0 or allow_empty_list):
>          result_list = set(lst)
>      else:
>          raise AppArmorBug('Passed unknown %(type)s object to %(classname)s: %(unknown_object)s' %
>
>
Acked-by: Kshitij Gupta <kgupta8592 at gmail.com>

>
> Regards,
>
> Christian Boltz
> --
>> derzeit mache ich nichts anderes als zu versuchen mit 3 verschiedenen
>> Kanonen (visas/yast/von Hand) auf ein Problem zu schießen, es aber
>> nicht zu treffen
> Als allererstes würde ich zwei der Kanonen weglegen. Dann die andere
> versuchen zu verstehen (da hat von Hand sicherlich die besten
> Chancen...) und dann dabei bleiben.
> [> Alexander Jäger und Arno Lehmann in suse-linux]
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
>



-- 
Regards,

Kshitij Gupta



More information about the AppArmor mailing list