From b2b77030812b1eb920fb8fa3f3f01aba934423bd Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 9 Jun 2018 21:19:12 +0100 Subject: [PATCH] [AutoAdd] Fix the logging for a failed added torrent Add a missing arg to the failed added torrent callback and update the logging text based on magnet or not. --- deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py index 81c33de4b..f09540e4d 100644 --- a/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py +++ b/deluge/plugins/AutoAdd/deluge/plugins/autoadd/core.py @@ -317,9 +317,14 @@ class Core(CorePluginBase): else: os.remove(filepath) - def fail_torrent_add(err_msg, filepath): + def fail_torrent_add(err_msg, filepath, magnet): # torrent handle is invalid and so is the magnet link - log.error('Cannot Autoadd torrent file: %s: %s', filepath, err_msg) + log.error( + 'Cannot Autoadd %s: %s: %s', + 'magnet' if magnet else 'torrent file', + filepath, + err_msg, + ) os.rename(filepath, filepath + '.invalid') try: