]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[utils] make_HTTPS_handler: Remove try/except block that would always raise an exception
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 12 Dec 2014 22:43:25 +0000 (23:43 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 12 Dec 2014 22:43:25 +0000 (23:43 +0100)
This code is only run for Python < 3.4, where context.load_default_certs doesn't exist

youtube_dl/utils.py

index 83a45e702a9b11cc461f4f0ebc9b587f5b5274c9..ec34dcef935240ef8cfb43d00e8589c4fd0040a1 100644 (file)
@@ -421,10 +421,6 @@ def make_HTTPS_handler(opts_no_check_certificate, **kwargs):
                                if opts_no_check_certificate
                                else ssl.CERT_REQUIRED)
         context.set_default_verify_paths()
-        try:
-            context.load_default_certs()
-        except AttributeError:
-            pass  # Python < 3.4
         return compat_urllib_request.HTTPSHandler(context=context, **kwargs)