diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-02-18 18:06:56 +0530 |
---|---|---|
committer | Deepak S <deepak.s@linux.intel.com> | 2017-02-21 08:33:44 +0530 |
commit | 6f51d2562e010d3d4dba2c4473ac2e6e654558e0 (patch) | |
tree | 997c6febd0a33467f2a90cd574973c19c3d71554 /yardstick/benchmark/runners/base.py | |
parent | dc58bc353c43d5a8bdada8278b3b59f50b533ab8 (diff) |
improving if conditions :)
Change-Id: I2fad46b07b252f898acfe116dd6542946b8a26a8
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'yardstick/benchmark/runners/base.py')
-rwxr-xr-x | yardstick/benchmark/runners/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index bf1a71cab..5b9081523 100755 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -127,7 +127,7 @@ class Runner(object): """Returns instance of a scenario runner for execution type. """ # if there is no runner, start the output serializer subprocess - if len(Runner.runners) == 0: + if not Runner.runners: log.debug("Starting dump process file '%s'", config["output_filename"]) Runner.queue = multiprocessing.Queue() @@ -155,7 +155,7 @@ class Runner(object): Runner.runners.remove(runner) # if this was the last runner, stop the output serializer subprocess - if len(Runner.runners) == 0: + if not Runner.runners: Runner.release_dump_process() @staticmethod @@ -170,7 +170,7 @@ class Runner(object): log.debug("Terminating all runners") # release dumper process as some errors before any runner is created - if len(Runner.runners) == 0: + if not Runner.runners: Runner.release_dump_process() return |