Skip to content

Commit

Permalink
update collection names
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Oct 2, 2024
1 parent c24dc4d commit 64a0faf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/collection_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ def main():
# Get providers
providers = []
collections = []

try:
with open(args.file, "r") as file:
collections_list = json.loads(file.read())
with open(file_path, 'r') as file:
file_content = file.read()
collections_list = json.loads(file_content)
except json.JSONDecodeError as e:
print(f"Failed to parse JSON: {e}")
print(f"Content of the file:\n{file_content}") # Print the file content
except FileNotFoundError:
print(f"Error: File '{args.file}' not found.")
return
except Exception as e:
print(f"An unexpected error occurred: {e}")

for collection in collections_list:
provider = collection.split('-')[1]
Expand Down

0 comments on commit 64a0faf

Please sign in to comment.