]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests/py: Fix test script for Python3 tempfile
authorPhil Sutter <phil@nwl.cc>
Tue, 29 Oct 2019 11:20:18 +0000 (12:20 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 29 Oct 2019 12:16:35 +0000 (13:16 +0100)
commit6b53baa89f5b6a0c1d2520820d9654418cda7105
tree716a35d4d0aabf93b824f5ab40fb4562959707f6
parent707ad229d48f2ba7920541527b755b155ddedcda
tests/py: Fix test script for Python3 tempfile

When instantiating a temporary file using tempfile's TemporaryFile()
constructor, the resulting object's 'name' attribute is of type int.
This in turn makes print_msg() puke while trying to concatenate string
and int using '+' operator.

Fix this by using format strings consequently, thereby cleaning up code
a bit.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/nft-test.py