change method of checking python version

This commit is contained in:
httprunner
2017-06-29 15:39:14 +08:00
parent 67a5de3575
commit a9c4af3a82
2 changed files with 4 additions and 7 deletions

View File

@@ -9,9 +9,10 @@ import yaml
from ate.exception import ParamsError
try:
assert bytes is str
string_type = basestring
PYTHON_VERSION = 2
except AssertionError:
except NameError:
string_type = str
PYTHON_VERSION = 3