Better error logging for syno downloader. close #2464

This commit is contained in:
Ruud
2013-11-16 23:33:23 +01:00
parent 0fafd83d76
commit 731419b61f
@@ -3,6 +3,7 @@ from couchpotato.core.helpers.encoding import isInt
from couchpotato.core.logger import CPLog
import json
import requests
import traceback
log = CPLog(__name__)
@@ -34,12 +35,12 @@ class Synology(Downloader):
elif data['protocol'] in ['nzb', 'torrent']:
log.info('Adding %s' % data['protocol'])
if not filedata:
log.error('No %s data found' % data['protocol'])
log.error('No %s data found', data['protocol'])
else:
filename = data['name'] + '.' + data['protocol']
response = srpc.create_task(filename = filename, filedata = filedata)
except Exception, err:
log.error('Exception while adding torrent: %s', err)
except:
log.error('Exception while adding torrent: %s', traceback.format_exc())
finally:
return response