aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd
diff options
context:
space:
mode:
authorHou Jingwen <houjingwen@huawei.com>2015-07-16 08:29:16 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-07-16 08:29:16 +0000
commitab4371757c7223d59dddc7bece1d3afa4dc3814b (patch)
tree1f0a8805cc8e0192b9cac9b978e406c6b4ccf826 /yardstick/cmd
parent621beb47d49adc35a40c51ecb1aaa0dc5d438900 (diff)
parent3e3426f2cc0e44f4048d058b227fab2c9db3e5b9 (diff)
Merge "Fix yardstick.out overwritten bug"
Diffstat (limited to 'yardstick/cmd')
-rw-r--r--yardstick/cmd/commands/task.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index d562256ba..8b9f269c5 100644
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -10,6 +10,7 @@
""" Handler for yardstick command 'task' """
import sys
+import os
import yaml
import atexit
import pkg_resources
@@ -47,6 +48,9 @@ class TaskCommands(object):
if args.parse_only:
sys.exit(0)
+ if os.path.isfile(args.output_file):
+ os.remove(args.output_file)
+
for context in Context.list:
context.deploy()