Re: [apparmor] [patch] Split off logprof_value_or_all()

2016-01-25 Thread Steve Beattie
On Sat, Dec 26, 2015 at 10:51:14PM +0100, Christian Boltz wrote: > the rule classes have lots of > > if self.all_foo: > foo_txt = _('ALL') > else: > foo_txt = self.foo > > in logprof_header_localvars(). > > To avoid repeating this over and over, split it

[apparmor] [patch] Split off logprof_value_or_all()

2015-12-26 Thread Christian Boltz
Hello, the rule classes have lots of if self.all_foo: foo_txt = _('ALL') else: foo_txt = self.foo in logprof_header_localvars(). To avoid repeating this over and over, split it off to a logprof_value_or_all() function. This function can handle - str