summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r--yardstick/benchmark/core/task.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 87d70f42f..bc1328624 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -85,7 +85,7 @@ class Task(object): # pragma: no cover
# (hide it for exit handler)
Context.list = []
else:
- for context in Context.list:
+ for context in Context.list[::-1]:
context.undeploy()
Context.list = []
one_task_end_time = time.time()
@@ -348,7 +348,7 @@ def atexit_handler():
if len(Context.list) > 0:
print("Undeploying all contexts")
- for context in Context.list:
+ for context in Context.list[::-1]:
context.undeploy()