Add an additional check in the try statement to prevent loading invalid

torrents
This commit is contained in:
Andrew Resch 2008-08-14 06:46:35 +00:00
parent a6700ba22c
commit e21183f125

View File

@ -74,7 +74,7 @@ class AutoAdd(component.Component):
filepath = os.path.join(self.config["autoadd_location"], filename) filepath = os.path.join(self.config["autoadd_location"], filename)
try: try:
filedump = self.load_torrent(filepath) 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 # If the torrent is invalid, we keep track of it so that we
# can try again on the next pass. This is because some # can try again on the next pass. This is because some
# torrents may not be fully saved during the pass. # torrents may not be fully saved during the pass.