thiezn / iperf3-python

Python wrapper around iperf3
https://iperf3-python.readthedocs.org/
MIT License
110 stars 51 forks source link

Hotfix/disable json output #6

Closed fciaccia closed 7 years ago

fciaccia commented 7 years ago

This hotfix allows to enable json_output=False without generating parsing error in the TestResults class. It just redirects the output to screen. The result object will then just have the text field, while to keep the other two properties available I pass the role and optionally the reverse flag parameter to the result class.

thiezn commented 7 years ago

Hi @fciaccia, thanks for your PR and patience. I had a hard time finding time to work on the iperf3 python wrapper.

The library should now allow you to set json_output = False. When this is set the iperf session will no longer return a TestResult class but rather just output the plain text response from iperf3 to screen (stdout).

Its implemented in commit d5f597002b654723093c472ae6952c99a5158f71