[apparmor] [patch] backport python3 compability patch to 2.8 branch

Seth Arnold seth.arnold at canonical.com
Mon May 6 22:46:26 UTC 2013


On Mon, May 06, 2013 at 11:54:58PM +0200, Christian Boltz wrote:
> Hello,
> 
> I'd like to propose the python3 compability changes from trunk r2052 to 
> the 2.8 branch.
> 
> Most of trunk r2052 also applies to the 2.8 branch. The only difference
> is one part for utils/vim/create-apparmor.vim.py:

I don't know the details of Python 3.x migration, nor how to keep
software working with both, but the only thing in here I spotted that
seemed out of place was the commented line below:

> -with file("apparmor.vim.in") as template:
> +with open("apparmor.vim.in") as template:
>      for line in template:
>          line = re.sub(regex, my_repl, line.rstrip())
> -        print line
> +        sys.stdout.write('%s\n' % line)
> +#        print line

This comment could be deleted.

So feel free to add Skimmed-by: Seth Arnold <seth.arnold at canonical.com>
or whatever says I didn't spot anything wrong but I also didn't
understand the finer points of what I've read. :)

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130506/10f0ccc3/attachment.pgp>


More information about the AppArmor mailing list