Better fix for #2183

This commit is contained in:
rembo10
2015-07-06 00:34:16 -07:00
parent 9149f62760
commit 7c990edeaf

View File

@@ -206,7 +206,7 @@ def server_message(response):
message = None
# First attempt is to 'read' the response as HTML
if response.headers.get("content-type") == "text/html":
if response.headers.get("content-type") and "text/html" in response.headers.get("content-type"):
try:
soup = BeautifulSoup(response.content, "html5lib")
except Exception: