[apparmor] [patch] Make aa.py 'log' non-global

Seth Arnold seth.arnold at canonical.com
Mon Aug 28 19:55:14 UTC 2017


On Sun, Aug 27, 2017 at 05:53:05PM +0200, Christian Boltz wrote:
> -    log_reader = apparmor.logparser.ReadLog(log_pid, logfile, existing_profiles, profile_dir, log)
> +    log_reader = apparmor.logparser.ReadLog(log_pid, logfile, existing_profiles, profile_dir, [])
>      log = log_reader.read_log(logmark)
>      #read_log(logmark)

On Sun, Aug 27, 2017 at 06:06:16PM +0200, Christian Boltz wrote:
> This parameter is always [], so we can simplify the ReadLog __init__()
> parameters.
> 
> Note that some tests handed over '' instead of []. This was a bug, but
> didn't matter because those tests only use a small portion of ReadLog.

> -    log_reader = apparmor.logparser.ReadLog(log_pid, logfile, existing_profiles, profile_dir, [])
> +    log_reader = apparmor.logparser.ReadLog(log_pid, logfile, existing_profiles, profile_dir)

Hah, I love it. The first patch introduced something I was worried about
and then the second patch fixes it :)

Both are

Acked-by: Seth Arnold <seth.arnold at canonical.com>

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/20170828/c88cf668/attachment.pgp>


More information about the AppArmor mailing list