fix to not fail on missing torrent

This commit is contained in:
Zach Tibbitts 2007-05-27 23:25:21 +00:00
parent e11c2f95e8
commit eb3e938b77
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
include LICENSE
include README
include Makefile
include deluge.desktop
include deluge.xpm
include msgfmt.py

View File

@ -643,6 +643,10 @@ class Manager:
torrents_with_unique_ID = self.unique_IDs.values()
for torrent in self.state.torrents:
if not os.path.exists(torrent.filename):
print "Missing file: %s" % torrent.filename
self.state.torrents.remove(torrent)
continue
if torrent not in torrents_with_unique_ID:
# print "Adding torrent to core:", torrent.filename, torrent.save_dir, torrent.compact
try: