1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use to_native when validating proxy result (#32596)

* Use bytes directly instead of converting to text
This commit is contained in:
David Hain 2017-11-06 12:20:07 -05:00 committed by Toshio Kuratomi
parent 930fde5f70
commit 708829fab9

View file

@ -677,7 +677,7 @@ class SSLValidationHandler(urllib_request.BaseHandler):
valid_codes = [200] if valid_codes is None else valid_codes
try:
(http_version, resp_code, msg) = re.match(r'(HTTP/\d\.\d) (\d\d\d) (.*)', response).groups()
(http_version, resp_code, msg) = re.match(br'(HTTP/\d\.\d) (\d\d\d) (.*)', response).groups()
if int(resp_code) not in valid_codes:
raise Exception
except: