Skip to content

Commit

Permalink
make dev cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
suecharo committed Oct 10, 2023
1 parent 20528ef commit b11a946
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schema_salad/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def fetch_text(self, url: str, content_types: Optional[List[str]] = None) -> str
except Exception as e:
raise ValidationException(f"Error fetching {url}: {e}") from e
if content_types and "content-type" in resp.headers:
received_content_types = set(resp.headers["content-type"].split(";")[:1][0].split(","))
received_content_types = set(
resp.headers["content-type"].split(";")[:1][0].split(",")
)
if set(content_types).isdisjoint(received_content_types):
_logger.warning(
"While fetching %s, got content-type of %r. Expected one of %s.",
Expand Down

0 comments on commit b11a946

Please sign in to comment.