diff options
author | cope.li <cope.li@huawei.com> | 2018-11-28 11:25:04 +0800 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-12-07 15:46:49 +0000 |
commit | 0cff13be7533bb187dc9d282964474e86e9d90a0 (patch) | |
tree | 9613de5372c36a7318ef7c0601b46d55e26d43c2 | |
parent | b7a4b50f3f7fdbeaddd0d62762769a7509953591 (diff) |
Compatible with python2 and 3 string check
JIRA:YARDSTICK-1557
Change-Id: I54ee4d6ef835e8e6ecd55cfa305151e842f88b03
Signed-off-by: cope.li <cope.li@huawei.com>
-rw-r--r-- | yardstick/benchmark/core/task.py | 3 |
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 |