From eab9a735a9e3be5a146f2f5667f7886c4061e87c Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 29 Mar 2013 12:39:06 +0100 Subject: [PATCH] Show real transmission error. --- couchpotato/core/downloaders/transmission/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission/main.py index 9b71d6b2..2383685c 100644 --- a/couchpotato/core/downloaders/transmission/main.py +++ b/couchpotato/core/downloaders/transmission/main.py @@ -6,6 +6,7 @@ import httplib import json import os.path import re +import traceback import urllib2 log = CPLog(__name__) @@ -60,13 +61,16 @@ class Transmission(Downloader): else: remote_torrent = trpc.add_torrent_file(b64encode(filedata), arguments = params) + if not remote_torrent: + return False + # Change settings of added torrents - if torrent_params: + elif torrent_params: trpc.set_torrent(remote_torrent['torrent-added']['hashString'], torrent_params) return self.downloadReturnId(remote_torrent['torrent-added']['hashString']) - except Exception, err: - log.error('Failed to change settings for transfer: %s', err) + except: + log.error('Failed to change settings for transfer: %s', traceback.format_exc()) return False