We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4116383 + d2a20b9 commit c3685d4Copy full SHA for c3685d4
pystac/catalog.py
@@ -594,8 +594,10 @@ def save(self, catalog_type=None):
594
# Ensure relative vs absolute
595
if catalog_type == CatalogType.ABSOLUTE_PUBLISHED:
596
self.make_all_links_absolute()
597
- else:
+ elif catalog_type in (CatalogType.SELF_CONTAINED, CatalogType.RELATIVE_PUBLISHED):
598
self.make_all_links_relative()
599
+ else:
600
+ raise ValueError(f'catalog_type is not a CatalogType: "{catalog_type}"')
601
602
include_self_link = catalog_type in [
603
CatalogType.ABSOLUTE_PUBLISHED, CatalogType.RELATIVE_PUBLISHED
0 commit comments