From 59f3d64537bb19b07c8fc7d5983f4c7e1dcb0143 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Wed, 25 Jul 2018 16:39:05 +0800 Subject: [PATCH] fix compatibility with python2.7 --- httprunner/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httprunner/compat.py b/httprunner/compat.py index 607c8b3d..e58ea033 100644 --- a/httprunner/compat.py +++ b/httprunner/compat.py @@ -40,7 +40,7 @@ if is_py2: integer_types = (int, long) FileNotFoundError = IOError - JSONDecodeError = json.decoder.JSONDecodeError + JSONDecodeError = ValueError elif is_py3: from collections import OrderedDict @@ -53,4 +53,4 @@ elif is_py3: integer_types = (int,) FileNotFoundError = FileNotFoundError - JSONDecodeError = ValueError + JSONDecodeError = json.decoder.JSONDecodeError