mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
fix compatibility for python 3.4, 3.5
This commit is contained in:
@@ -93,6 +93,8 @@ class ResponseObject(object):
|
|||||||
if not isinstance(top_query_content, (dict, CaseInsensitiveDict, list)):
|
if not isinstance(top_query_content, (dict, CaseInsensitiveDict, list)):
|
||||||
try:
|
try:
|
||||||
# TODO: remove compatibility for content, text
|
# TODO: remove compatibility for content, text
|
||||||
|
if isinstance(top_query_content, bytes):
|
||||||
|
top_query_content = top_query_content.decode("utf-8")
|
||||||
top_query_content = json.loads(top_query_content)
|
top_query_content = json.loads(top_query_content)
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
err_msg = u"Failed to extract data with delimiter!\n"
|
err_msg = u"Failed to extract data with delimiter!\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user