Skip to content
Permalink
Browse files

update download_data for a specific case

  • Loading branch information...
sdpython committed Jun 7, 2018
1 parent 664b913 commit eeadae8099c630ca62f9d6a4f681ed6ac999a9c0
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/pyensae/datasource/http_retrieve.py
@@ -148,6 +148,9 @@ def transform_url(w):

# Multiple downloads.
if isinstance(url, list):
single = isinstance(name, str)
if single:
name = [name] * len(url)
if not isinstance(name, list):
raise TypeError("If url is a list, name be a list too.")
if len(name) != len(url):
@@ -161,6 +164,8 @@ def transform_url(w):
outfiles.extend(res)
else:
outfiles.append(res)
if single and res is not None and os.path.exists(res):
break
return outfiles
elif isinstance(name, list):
outfiles = []

0 comments on commit eeadae8

Please sign in to comment.
You can’t perform that action at this time.