Update logging to handly empty PMS responses

This commit is contained in:
tomkat83 2016-01-12 14:25:12 +01:00
parent b26b679dc1
commit b2a9f1a453

View file

@ -326,6 +326,11 @@ class DownloadUtils():
self.logMsg("====== 200 Success ======", 2)
self.logMsg("Received an XML response for: %s" % url, 2)
return r
except:
try:
if r.text == '' and r.status_code == 200:
self.logMsg("====== 200 Success ======", 2)
self.logMsg("Answer from PMS does not contain a body", 2)
except:
self.logMsg("Unable to convert the response for: %s" % url, 2)
self.logMsg("Content-type was: %s" % r.headers['content-type'], 2)