summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Ernst <ryan@iernst.net>2023-02-11 22:06:36 -0800
committerCalum Lind <calumlind+deluge@gmail.com>2023-02-23 17:08:48 +0000
commitfa750c9fd0537fb31e774d51c572137ee6b83830 (patch)
tree947b1d25b856fba52f4ea5e46df12a85b8dd4eed
parent2a945de0695ba0a5bf2d928ce4bd541d0f5cf2a8 (diff)
downloaddeluge-fa750c9fd0537fb31e774d51c572137ee6b83830.tar.gz
deluge-fa750c9fd0537fb31e774d51c572137ee6b83830.tar.bz2
deluge-fa750c9fd0537fb31e774d51c572137ee6b83830.zip
[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: <class 'RuntimeError'>: 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
-rw-r--r--deluge/plugins/AutoAdd/deluge_autoadd/core.py2
1 files changed, 1 insertions, 1 deletions
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)