Commit 53841bf4 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix for expected content-type in fetch method

parent de25597a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ def fetch(url : str, expected_content_type : str = None) -> requests.Response:
        logging.error(errorMessage)
        raise ValueError(errorMessage)
    if expected_content_type:
        if r.headers['Content-Type'] != expected_content_type:
        if not expected_content_type in r.headers['Content-Type']:
            errorMessage = f"Unexpected content type retrieving {url}. Expected {expected_content_type}, got {r.headers['Content-Type']}"
            logging.error(errorMessage)
            raise ValueError(errorMessage)