Re: [PATCH nft v7 1/2]tests:py: conversion to python3

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

 



On Tue, Jun 18, 2019 at 10:31:06AM -0400, Eric Garver wrote:
> On Fri, Jun 14, 2019 at 08:01:44PM +0530, Shekhar Sharma wrote:
> > This patch converts the 'nft-test.py' file to run on both python 2 and python3.
> > 
> > Signed-off-by: Shekhar Sharma <shekhar250198@xxxxxxxxx>
> > ---
> > The version hystory of this patch is:
> > v1:conversion to py3 by changing the print statements.
> > v2:add the '__future__' package for compatibility with py2 and py3.
> > v3:solves the 'version' problem in argparse by adding a new argument.
> > v4:uses .format() method to make print statements clearer.
> > v5:updated the shebang and corrected the sequence of import statements.
> > v6:resent the same with small changes
> > v7:resent with small changes

I apply this patch, then, from the nftables/tests/py/ folder I run:

# python3 nft-test.py

I get:

INFO: Log will be available at /tmp/nftables-test.log
Traceback (most recent call last):
  File "nft-test.py", line 1454, in <module>
    main()
  File "nft-test.py", line 1422, in main
    result = run_test_file(filename, force_all_family_option, specific_file)
  File "nft-test.py", line 1290, in run_test_file
    filename_path)
  File "nft-test.py", line 774, in rule_add
    payload_log = os.tmpfile()
AttributeError: module 'os' has no attribute 'tmpfile'



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux