[python-2.7.9] fix 'SSL: CERTIFICATE_VERIFY_FAILED'
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-devtools / python / python / urllib2_create_unverified_context.patch
1 commit 7ac30501e99ca139a20701f6b56be3eccacd8ea0
2 Author: hschang <chang@dev3>
3 Date:   Thu Dec 3 11:03:41 2015 +0900
4
5     [urllib2] Handle target environment that doesn't support HTTPS verification.
6
7 diff --git a/Lib/urllib2.py b/Lib/urllib2.py
8 index 9277b1d..24e7ada 100644
9 --- a/Lib/urllib2.py
10 +++ b/Lib/urllib2.py
11 @@ -112,6 +112,7 @@ except ImportError:
12  # check for SSL
13  try:
14      import ssl
15 +    ssl._create_default_https_context = ssl._create_unverified_context
16  except ImportError:
17      _have_ssl = False
18  else: