On Mon, Jun 09, 2014 at 09:05:58PM +0200, Christian Boltz wrote:
> Hallo Leute,
> 
> Am Montag, 9. Juni 2014 schrieb Christian Boltz:
> > However, a warning can't hurt. Slightly updated patch:
> 
> Well, actually it can hurt - if you don't import the warn() function ;-)
> 
> So here's v3:

Acked-by: Steve Beattie <[email protected]>. Thanks.

(Oddly, I though one of pyflakes or pep8 would warn about tests like
this, but that doesn't seem to be the case.)

> === modified file 'utils/aa-genprof'
> --- utils/aa-genprof    2014-05-21 19:42:43 +0000
> +++ utils/aa-genprof    2014-06-09 19:04:51 +0000
> @@ -21,6 +21,7 @@
>  
>  import apparmor.aa as apparmor
>  import apparmor.ui as aaui
> +from apparmor.common import warn
>  
>  # setup module translations
>  from apparmor.translations import init_translation
> @@ -33,7 +34,8 @@
>      return value
>  
>  def sysctl_write(path, value):
> -    if not value:
> +    if value is None:
> +        warn('Not writing invalid value "None" to %s'%path)
>          return
>      with open(path, 'w') as f_out:
>          f_out.write(str(value))
> 
> 

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

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

Reply via email to