From fa750c9fd0537fb31e774d51c572137ee6b83830 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Sat, 11 Feb 2023 22:06:36 -0800 Subject: [PATCH] [AutoAdd] Fixes #3515 - check for more torrent decode errors https://github.com/deluge-torrent/deluge/pull/381 improved the situation with possible errors during torrent decoding. However, the log message in https://dev.deluge-torrent.org/ticket/3515 indicates a RuntimeError: ``` Traceback: : unexpected end of file in bencoded string ``` This commit adds RuntimeError to those caught while loading the torrent to add. Closes: https://github.com/deluge-torrent/deluge/pull/411 --- deluge/plugins/AutoAdd/deluge_autoadd/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/plugins/AutoAdd/deluge_autoadd/core.py b/deluge/plugins/AutoAdd/deluge_autoadd/core.py index 07ad53a8e..9b6eee098 100644 --- a/deluge/plugins/AutoAdd/deluge_autoadd/core.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/core.py @@ -271,7 +271,7 @@ class Core(CorePluginBase): try: filedump = self.load_torrent(filepath, magnet) - except (OSError, EOFError, InvalidTorrentError) as ex: + except (OSError, EOFError, RuntimeError, InvalidTorrentError) as ex: # If torrent is invalid, keep track of it so can try again on the next pass. # This catches torrent files that may not be fully saved to disk at load time. log.debug('Torrent is invalid: %s', ex)