From 8b7ad7a799897b1958064ad58ecabee157d9ad34 Mon Sep 17 00:00:00 2001 From: co1in Date: Fri, 8 Oct 2021 17:52:58 +0800 Subject: [PATCH] fix a SyntaxWarning with Python 3.8 --- alipay/aop/api/util/WebUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alipay/aop/api/util/WebUtils.py b/alipay/aop/api/util/WebUtils.py index 148e75beb..0d4802d12 100644 --- a/alipay/aop/api/util/WebUtils.py +++ b/alipay/aop/api/util/WebUtils.py @@ -145,7 +145,7 @@ def do_post(url, query_string=None, headers=None, params=None, charset='utf-8', except Exception as e: raise RequestException('[' + THREAD_LOCAL.uuid + ']post request failed. ' + str(e)) response = connection.getresponse() - if response.status is not 200: + if response.status != 200: raise ResponseException('[' + THREAD_LOCAL.uuid + ']invalid http status ' + str(response.status) + \ ',detail body:' + response.read()) result = response.read() @@ -183,7 +183,7 @@ def do_multipart_post(url, query_string=None, headers=None, params=None, multipa except Exception as e: raise RequestException('[' + THREAD_LOCAL.uuid + ']post request failed. ' + str(e)) response = connection.getresponse() - if response.status is not 200: + if response.status != 200: raise ResponseException('[' + THREAD_LOCAL.uuid + ']invalid http status ' + str(response.status) + \ ',detail body:' + response.read()) result = response.read()