From 369d4a9d47811b2dac71cddcadf0aedf6ec9eaee Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 20 Jun 2017 21:04:00 +0800 Subject: [PATCH] bugfix: make compatible with python 2.7/3.3/3.4 --- README.md | 4 ++++ ate/utils.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8bb5126..63c9f223 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ $ pip install -r requirements.txt ``` +## Supported Python Versions + +Python 2.7, 3.3, 3.4, 3.5, and 3.6. + ## 阅读更多 - [《背景介绍》](docs/background.md) diff --git a/ate/utils.py b/ate/utils.py index f9519fc3..8698f4b3 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -24,7 +24,7 @@ def load_testcases(testcase_file_path): def parse_response_object(resp_obj): try: resp_content = resp_obj.json() - except json.decoder.JSONDecodeError: + except ValueError: resp_content = resp_obj.text return {