Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions wagon.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
try:
import urllib.error
from urllib.request import urlopen
from urllib.request import URLopener
from urllib.request import urlretrieve
except ImportError:
import urllib
from urllib import urlopen
from urllib import URLopener
from urllib import urlretrieve

try:
from distro import linux_distribution
Expand Down Expand Up @@ -320,8 +320,7 @@ def _download_file(url, destination):
final_url = response.geturl()
if final_url != url and is_verbose():
logger.debug('Redirected to %s', final_url)
f = URLopener()
f.retrieve(final_url, destination)
urlretrieve(final_url, destination)


def _http_request(url):
Expand Down