Skip to content

Commit

Permalink
enh: improve error reporting for download from selection
Browse files Browse the repository at this point in the history
  • Loading branch information
vkt1414 committed Apr 1, 2024
1 parent 62c9d7a commit 4f7a4ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions idc_index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ def download_from_selection(
TypeError: If any of the parameters are not of the expected type
"""

downloadDir = os.path.abspath(downloadDir).replace("\\", "/")
if not os.path.exists(downloadDir):
raise ValueError("Download directory does not exist.")

if collection_id is not None:
if not isinstance(collection_id, str) and not isinstance(
collection_id, list
Expand Down

0 comments on commit 4f7a4ef

Please sign in to comment.