From cb81bcac570f9fe39f1f5a1c75863b9d3b66912b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 3 Mar 2019 13:39:45 -0800 Subject: [PATCH] Return default blank content type (Fixes Tautulli/Tautulli-Issues#165) --- plexpy/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/request.py b/plexpy/request.py index f92212a8..c2903e27 100644 --- a/plexpy/request.py +++ b/plexpy/request.py @@ -289,7 +289,7 @@ def server_message(response, return_msg=False): message = None # First attempt is to 'read' the response as HTML - if "text/html" in response.headers.get("content-type"): + if "text/html" in response.headers.get("content-type", ""): try: soup = BeautifulSoup(response.content, "html5lib") except Exception: