Added response checking to confirm a valid 200 http response code is returned

This commit is contained in:
echel0n 2014-04-22 20:41:46 -07:00
commit c0f61ecb2d

View file

@ -163,6 +163,10 @@ class autoProcessTV:
logger.error("Unable to open URL: %s" % (url), section)
return 1 # failure
if not r.ok:
logger.error('FAILED: Something went wrong!, check your logs ...', section)
return 1
for line in r.iter_lines():
if line: logger.postprocess("%s" % (line), section)