From 708829fab9af71368aeeff6b98c02d00d062a6a6 Mon Sep 17 00:00:00 2001 From: David Hain Date: Mon, 6 Nov 2017 12:20:07 -0500 Subject: [PATCH] Use to_native when validating proxy result (#32596) * Use bytes directly instead of converting to text --- lib/ansible/module_utils/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index f64fe34b20..9f7265e7f0 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -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: