Skip to content

Commit

Permalink
modify way we get a filename
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Aug 28, 2023
1 parent 1dfec65 commit 6699cc3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion add_collection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,12 @@ def test(collection_id, venue):

for file in original_files:

file_name = file.rsplit(".", 1)[0]
# if the file name end in an alphabet so we know there is some extension
if file[-1].isalpha():
file_name = file.rsplit(".", 1)[0]
else:
file_name = file

print(file_name)
cmr_query = f"{cmr_base_url}{file_name}&collection_concept_id={collection_id}"
print(cmr_query)
Expand Down

0 comments on commit 6699cc3

Please sign in to comment.