diff --git a/web/run.py b/web/run.py old mode 100755 new mode 100644 index 097d869..25ae180 --- a/web/run.py +++ b/web/run.py @@ -8,7 +8,7 @@ import logging import random import tarfile import time -import urllib +import urllib.request as urllib_request import requests import re # regex import numpy @@ -516,7 +516,7 @@ def retrieve_amda_netcdf(orbiter, what, started_at, stopped_at): remote_gzip_files = [] while not success and retries < 3: try: - response = urllib.urlopen(url) + response = urllib_request.urlopen(url) remote_gzip_files = json.loads(response.read()) if not remote_gzip_files: raise Exception("Failed to fetch data at '%s'." % url) @@ -558,7 +558,7 @@ def retrieve_amda_netcdf(orbiter, what, started_at, stopped_at): local_gzip_files.append(local_gzip_file) if not isfile(local_gzip_file): log.debug("Retrieving '%s'..." % local_gzip_file) - urllib.urlretrieve(remote_gzip_file, local_gzip_file) + urllib_request.urlretrieve(remote_gzip_file, local_gzip_file) log.debug("Retrieved '%s'." % local_gzip_file) else: log.debug("Found '%s' in the cache." % local_gzip_file) -- libgit2 0.21.2