aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/update.py
diff options
context:
space:
mode:
authorDavid Ben Zakai <david.benzakai@gmail.com>2015-11-10 16:31:31 +0200
committerDavid Ben Zakai <david.benzakai@gmail.com>2015-11-10 16:31:42 +0200
commitd3d3e2e3aac13c3c6fbae0fcfeaa41ce5ee9144b (patch)
tree23c4e033000f7afdea1700570c87775bcf6934a1 /youtube_dl/update.py
parent37ca7b22b5521d7797ffefcd1456b4eb31320460 (diff)
Adding proxy to update procedure
Diffstat (limited to 'youtube_dl/update.py')
-rw-r--r--youtube_dl/update.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/update.py b/youtube_dl/update.py
index fc7ac8305..04bf0939e 100644
--- a/youtube_dl/update.py
+++ b/youtube_dl/update.py
@@ -13,7 +13,7 @@ from .compat import (
compat_str,
compat_urllib_request,
)
-from .utils import make_HTTPS_handler
+
from .version import __version__
@@ -47,7 +47,7 @@ def rsa_verify(message, signature, key):
return True
-def update_self(to_screen, verbose):
+def update_self(to_screen, verbose, opener):
"""Update the program file with the latest version from the repository"""
UPDATE_URL = "https://rg3.github.io/youtube-dl/update/"
@@ -59,9 +59,6 @@ def update_self(to_screen, verbose):
to_screen('It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.')
return
- https_handler = make_HTTPS_handler({})
- opener = compat_urllib_request.build_opener(https_handler)
-
# Check if there is a new version
try:
newversion = opener.open(VERSION_URL).read().decode('utf-8').strip()