If you currently try to run it on Python 3.6, it will fail with the following message:
Traceback (most recent call last):
File "./nft-stats.py", line 111, in <module>
main()
File "./nft-stats.py", line 104, in main
out = run_command(args)
File "./nft-stats.py", line 42, in run_command
nft_run = subprocess.run(command, shell=True, capture_output=True)
File "/usr/lib64/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'
If you currently try to run it on Python 3.6, it will fail with the following message:
The culprit is this line:
This is due to Python 3.6 not supporting the option
capture_output
. The solution is changing it to this instead:This works on Python 3.6 and above from my testing (and should work on 3.5 as well)