Re: [PATCH 02/50] tests: Use python3 compatible print statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 24, 2019 at 04:45:42PM +0900, Masashi Honma wrote:
> This patch is made by using 2to3 command.
> 
> $ find . -name *.py | xargs 2to3 -f print -w -n

This seems to break couple of things:

> diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py

> -        print("\rStarting virtual machine {}/{}".format(i + 1, num_servers)),
> +        print(("\rStarting virtual machine {}/{}".format(i + 1, num_servers)), end=' ')

This needs "from __future__ import print_function" to work with python2.

> -    print
> +    print()

I guess same workaround could be used here as well since python2 would
print out "()\n" here instead of the expected "\n". Converting this to
"print('')" looks safer.

I handled those manually through the patch, so no need to send an
updated version.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux