Fix orange color not working

This commit is contained in:
Peter Vacho 2024-11-25 13:39:36 +01:00
parent 50e3eda837
commit 3ed8de92ab
Signed by: school
GPG key ID: 8CFC3837052871B4

View file

@ -87,13 +87,13 @@ def standard_urlmap_exception_suppressor(exc: Exception, url: httpx.URL) -> bool
"Got ",
("Non-HTML Content-Type Header", "red"),
", (",
(str(exc.response.headers.get("Content-Type", "")), "orange"),
(str(exc.response.headers.get("Content-Type", "")), "grey69"),
")",
)
return True
if isinstance(exc, httpx.TransportError):
print_exc("Got ", (exc.__class__.__qualname__, "red"), ", (", (str(exc), "orange"), ")")
print_exc("Got ", (exc.__class__.__qualname__, "red"), ", (", (str(exc), "grey69"), ")")
return True
if isinstance(exc, ParserRejectedMarkup):