From ef9a2015eba4be75ed160a90cb08e1299c00126e Mon Sep 17 00:00:00 2001 From: Noam Date: Tue, 16 Feb 2016 21:04:42 +0200 Subject: [PATCH] Added debugging for tests and fixed setTorrentPause --- headphones/deluge.py | 2 +- headphones/searcher.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/headphones/deluge.py b/headphones/deluge.py index 981ca8e3..b0517b72 100644 --- a/headphones/deluge.py +++ b/headphones/deluge.py @@ -381,7 +381,7 @@ def setTorrentPath(result): return True -def addTorrentPause(result): +def setTorrentPause(result): if not any(delugeweb_auth): _get_auth() diff --git a/headphones/searcher.py b/headphones/searcher.py index b06bcffc..61ab99d8 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -929,9 +929,14 @@ def send_to_downloader(data, bestqual, album): return except Exception as e: - #exc_type, exc_obj, exc_tb = sys.exc_info() - #fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] - #print(exc_type, fname, exc_tb.tb_lineno) + # REMOVE LATER - FOR DEBUGGING + super_debug = True + if super_debug: + import sys + exc_type, exc_obj, exc_tb = sys.exc_info() + fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] + logger.error('SUPER_DEBUG: ' + str(e) + ' -- ' + '; '.join([exc_type, fname, exc_tb.tb_lineno])) + ###### logger.error(str(e)) else: # if headphones.CONFIG.TORRENT_DOWNLOADER == 2: