summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2018-12-24 09:06:49 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-24 09:06:49 +0000
commit2b321003001e71fec83a5138afd9638d3f97fb7d (patch)
tree6e6486e7c27ed3d3f8099a9639c547ba3538560c
parentf6a9585e5c4e49970574ab7f885a5f2b88228f5b (diff)
parent0cff13be7533bb187dc9d282964474e86e9d90a0 (diff)
Merge "Compatible with python2 and 3 string check"
-rw-r--r--yardstick/benchmark/core/task.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 1dfd6c31e..477dbcc57 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -11,6 +11,7 @@ import sys
import os
from collections import OrderedDict
+import six
import yaml
import atexit
import ipaddress
@@ -313,7 +314,7 @@ class Task(object): # pragma: no cover
return {k: self._parse_options(v) for k, v in op.items()}
elif isinstance(op, list):
return [self._parse_options(v) for v in op]
- elif isinstance(op, str):
+ elif isinstance(op, six.string_types):
return self.outputs.get(op[1:]) if op.startswith('$') else op
else:
return op