Skip to content

Commit

Permalink
Throw an err if the file of the dataset to be downloaded, doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Aug 3, 2018
1 parent 999f3b0 commit 0a2f838
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/cloud/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def load_credential(credentials_file):


def download(provider, credentials_file, bucket, object_label, filename, overwrite_existing):
if not os.path.exists(filename):
raise Exception("The file `{}` does not exist.".format(filename))
credentials = load_credential(credentials_file)
if CloudProviderFactory is None:
raise Exception(NO_CLOUDBRIDGE_ERROR_MESSAGE)
Expand Down

0 comments on commit 0a2f838

Please sign in to comment.