Handle unexpected response

API seems to return text/html response for playeditems
This commit is contained in:
angelblue05 2015-05-04 14:09:01 -05:00
parent fc05e83d90
commit b996037e4e

View file

@ -238,6 +238,9 @@ class DownloadUtils():
self.logMsg("====== 200 Success ======", 2) self.logMsg("====== 200 Success ======", 2)
return r return r
except: except:
if r.headers['content-type'] == "text/html":
pass
else:
self.logMsg("Unable to convert the response for: %s" % url, 1) self.logMsg("Unable to convert the response for: %s" % url, 1)
else: else:
r.raise_for_status() r.raise_for_status()