瀏覽代碼

[utils] make_HTTPS_handler: Remove try/except block that would always raise an exception

This code is only run for Python < 3.4, where context.load_default_certs doesn't exist
Jaime Marquínez Ferrándiz 11 年之前
父節點
當前提交
293f0f39ce
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      youtube_dl/utils.py

+ 0 - 4
youtube_dl/utils.py

@@ -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)