From b996037e4e40c21304a0f54a21cd4c2ed251481c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 4 May 2015 14:09:01 -0500 Subject: [PATCH] Handle unexpected response API seems to return text/html response for playeditems --- resources/lib/DownloadUtils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/DownloadUtils.py b/resources/lib/DownloadUtils.py index 390a9d2d..d18d2b8a 100644 --- a/resources/lib/DownloadUtils.py +++ b/resources/lib/DownloadUtils.py @@ -238,7 +238,10 @@ class DownloadUtils(): self.logMsg("====== 200 Success ======", 2) return r except: - self.logMsg("Unable to convert the response for: %s" % url, 1) + if r.headers['content-type'] == "text/html": + pass + else: + self.logMsg("Unable to convert the response for: %s" % url, 1) else: r.raise_for_status()