On Sun, Jul 09, 2017 at 09:32:55PM +0200, Christian Boltz wrote:
> [ 03-ProfileStorage-class.diff ]

> +    def __getitem__(self, key):
> +        if key in self.data:
> +            return self.data[key]
> +        else:
> +            raise AppArmorBug('attemp to read unknown key %s' % key)

Change 'attemp' to 'attempt' everywhere in this series, and then...
Acked-by: Seth Arnold <[email protected]>

Thanks

> +
> +    def __setitem__(self, key, value):
> +        # TODO: Most of the keys (containing *Ruleset, dict(), list() or 
> hasher()) should be read-only.
> +        #       Their content needs to be changed, but the container 
> shouldn't
> +        #       Note: 
> serialize_profile_from_old_profile.write_prior_segments() and 
> write_prior_segments() expect the container to be writeable!
> +        # TODO: check if value has the expected type
> +        if key in self.data:
> +            self.data[key] = value
> +        else:
> +            raise AppArmorBug('attemp to set unknown key %s' % key)
> +
> +    def get(self, key, fallback=None):
> +        if key in self.data:
> +            return self.data.get(key, fallback)
> +        else:
> +            raise AppArmorBug('attemp to read unknown key %s' % key)

Attachment: signature.asc
Description: PGP signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to