catch the error from CouchPotato. Helps #472 #471

This commit is contained in:
clinton-hall 2014-07-10 09:57:04 +09:30
commit a2e38f0e39

View file

@ -29,9 +29,16 @@ class autoProcessMovie:
r = requests.get(url, params=params, verify=False)
except requests.ConnectionError:
logger.error("Unable to open URL %s" % url)
return
return results
try:
result = r.json()
except:
logger.error("CouchPotato returned the following non-json data")
for line in r.iter_lines():
logger.error("%s" %(line))
return results
result = r.json()
if not result['success']:
if 'error' in result:
logger.error(str(result['error']))