bugfix: Define _EXECUTED_PIDS in config file 23/50923/1
authorMartin Klozik <martinx.klozik@intel.com>
Mon, 22 Jan 2018 11:23:41 +0000 (11:23 +0000)
committerMartin Klozik <martinx.klozik@intel.com>
Mon, 22 Jan 2018 11:23:41 +0000 (11:23 +0000)
Add definition of internal _EXECUTED_PIDS list into generic
configuration file.

JIRA: VSPERF-556

Change-Id: I6c237cb563c0a37bf806561d1f841587796399b8
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
conf/00_common.conf
tools/tasks.py

index 4c25b0b..279c67b 100644 (file)
@@ -90,6 +90,9 @@ PATHS = {}
 # shell command to use when running commands through Pexpect
 SHELL_CMD = ['/bin/bash', '-c']
 
+# internal list to keep track of PIDs of jobs executed by vsperf
+_EXECUTED_PIDS = []
+
 # ############################
 # Logging configuration
 # ############################
index 18f4d71..4e03f85 100644 (file)
@@ -117,11 +117,8 @@ def run_task(cmd, logger, msg=None, check_error=False):
 def update_pids(pid):
     """update list of running pids, so they can be terminated at the end
     """
-    try:
-        pids = settings.getValue('_EXECUTED_PIDS')
-        pids.append(pid)
-    except AttributeError:
-        pids = [pid]
+    pids = settings.getValue('_EXECUTED_PIDS')
+    pids.append(pid)
     settings.setValue('_EXECUTED_PIDS', pids)
 
 def run_background_task(cmd, logger, msg):