Skip to content

Commit ca5cb11

Browse files
committed
Merge pull request kivy#3669 from Ramalus/patch-3
Fix breakage in Python < 2.7.9
2 parents 3e06c0f + 26c69a2 commit ca5cb11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kivy/network/urlrequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ def _fetch_url(http://github.com/self,%20url,%20body,%20headers,%20q):
272272
ctx.verify_mode = ssl.CERT_REQUIRED
273273
args['context'] = ctx
274274

275-
if not verify and parse.scheme == 'https':
275+
if not verify and parse.scheme == 'https' and (
276+
hasattr(ssl, 'create_default_context')):
276277
ctx = ssl.create_default_context()
277278
ctx.check_hostname = False
278279
ctx.verify_mode = ssl.CERT_NONE

0 commit comments

Comments
 (0)