diff options
author | 2016-10-01 02:21:36 +0800 | |
---|---|---|
committer | 2016-10-01 02:23:53 +0800 | |
commit | 6204bfbe6228d5167bdb67c42cac4c884cdcf664 (patch) | |
tree | b67981719c8aa0542e040d70951bdb7aff044aad /testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py | |
parent | 3ac496ac711f40f2a4c4fb0837758b4fbade43e4 (diff) |
autopep8 fix for flake8
JIRA: BOTTLENECK-101
Using autopep8 to fix the python style scanned by flake8
Change-Id: I74bf28ed4d999dac3dd36e9101f099c9853a49b6
Signed-off-by: yuyang <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py')
-rw-r--r-- | testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py b/testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py index 99f1c904..dac7d649 100644 --- a/testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py +++ b/testsuites/vstf/vstf_scripts/vstf/agent/perf/netperf.py @@ -20,6 +20,7 @@ LOG = logging.getLogger(__name__) class Netperf(object): + def __init__(self): self._send_processes = [] self._islat = False @@ -48,7 +49,10 @@ class Netperf(object): LOG.info("cmd:%s", cmd) for _ in range(threads): - process = my_popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process = my_popen( + cmd.split(), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) self._send_processes.append(process) time.sleep(0.5) for process in self._send_processes: @@ -119,7 +123,10 @@ class Netperf(object): cmd = self.format_receive_start(**kwargs) LOG.info("cmd:%s", cmd) - process = my_popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process = my_popen( + cmd.split(), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) time.sleep(0.5) ret = process.poll() if ret: @@ -177,5 +184,8 @@ def unit_test(): if __name__ == "__main__": from vstf.common.log import setup_logging - setup_logging(level=logging.DEBUG, log_file="/var/log/vstf/vstf-netperf.log", clevel=logging.DEBUG) + setup_logging( + level=logging.DEBUG, + log_file="/var/log/vstf/vstf-netperf.log", + clevel=logging.DEBUG) unit_test() |