diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-22 19:57:52 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-22 19:57:52 +0100 |
commit | dca087205692c934163ec9aca5962056f890cd19 (patch) | |
tree | 476c4fc3e1457d7a080e2ee253b3040ecc1bc4b7 /youtube_dl/utils.py | |
parent | 0b63aed8dfd36a5a7f5ae6518b9c385d9a43e735 (diff) |
Move the opener to the YoutubeDL object.
This is the first step towards being able to just import youtube_dl and start using it.
Apart from removing global state, this would fix problems like #1805.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 0720fe9eb..0d2b7bd10 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -535,7 +535,7 @@ def formatSeconds(secs): else: return '%d' % secs -def make_HTTPS_handler(opts): +def make_HTTPS_handler(opts_no_check_certificate): if sys.version_info < (3,2): # Python's 2.x handler is very simplistic return compat_urllib_request.HTTPSHandler() @@ -545,7 +545,7 @@ def make_HTTPS_handler(opts): context.set_default_verify_paths() context.verify_mode = (ssl.CERT_NONE - if opts.no_check_certificate + if opts_no_check_certificate else ssl.CERT_REQUIRED) return compat_urllib_request.HTTPSHandler(context=context) |