Skip to content

Commit

Permalink
minor fixes in download script
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Jan 1, 2021
1 parent 4b86609 commit 7631bc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imagetagger/imagetagger/images/templates/images/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
sys.argv.remove("-s")
print("The images will be downloaded separately instead of as zip.")
if len(sys.argv) < 2:
imageset = input("Imagesets you want to download, separated by a ',' or ' ':")
imageset = input("Imagesets you want to download, separated by a ',' or ' ': ")
else:
if sys.argv[1] == '-h':
print("This script will download images from the specified imageset for you.")
Expand Down Expand Up @@ -90,7 +90,7 @@ def download_zip(current_imageset):
stream=True) as r:
# this is intended for the case when an imageset does not exist or the zip does not yet exist
if r.status_code == 404:
print("In Imageset {} was an error. The server returned page not found.".format(current_imageset))
print("In Imageset {} was an error. The server returned page not found. Try --separate if zip download is disabled.".format(current_imageset))
errorlist.append(current_imageset)
return
filepath = os.path.join(filename, current_imageset)
Expand Down Expand Up @@ -143,7 +143,7 @@ def download_imageset(current_imageset):


for imgset in imagesets:
if imgset is not " ":
if imgset != " ":
if not separate_download:
download_zip(imgset)
else:
Expand Down

0 comments on commit 7631bc9

Please sign in to comment.