Skip to content

Commit

Permalink
Fix tileserver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aacic committed Dec 12, 2024
1 parent dc808e7 commit 19195ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/zarrtiff/tiff_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@


def _parse_svs_metadata(pages: TiffPages) -> dict[str, Any]:
# Copy/paste from TIFFWSIReader._parse_svs_metadata, extract to the util method.
"""Extract SVS-specific metadata."""
raw = {}
mpp: list[float] | None = None
Expand All @@ -40,8 +41,10 @@ def parse_svs_tag(string: str) -> tuple[str, Number | str | datetime]:
"""Parse SVS key-value string."""
pair = string.split("=")
if len(pair) != EXPECTED_KEY_VALUE_PAIRS:
msg = "Invalid metadata. Expected string of the format 'key=value'."
raise ValueError(msg)
invalid_metadata_msg = (
"Invalid metadata. Expected string of the format 'key=value'."
)
raise ValueError(invalid_metadata_msg)

key, value_string = pair
key = key.strip()
Expand Down

0 comments on commit 19195ff

Please sign in to comment.