From e21183f125febdcd4597d0c4b816ab57a1e2d6b7 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 14 Aug 2008 06:46:35 +0000 Subject: [PATCH] Add an additional check in the try statement to prevent loading invalid torrents --- deluge/core/autoadd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/autoadd.py b/deluge/core/autoadd.py index 1ad88ad7d..e59cb8cd0 100644 --- a/deluge/core/autoadd.py +++ b/deluge/core/autoadd.py @@ -74,7 +74,7 @@ class AutoAdd(component.Component): filepath = os.path.join(self.config["autoadd_location"], filename) try: filedump = self.load_torrent(filepath) - except Exception, e: + except (RuntimeError, Exception), e: # If the torrent is invalid, we keep track of it so that we # can try again on the next pass. This is because some # torrents may not be fully saved during the pass.