if I delete a .torrent file from the hdd that deluge have in its list, and then start deluge, I get the following (0.5.7.1):
Code: Select all
no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Applying preferences
Missing file: /tmp/mytorrentfile.torrent
Traceback (most recent call last):
File "/usr/bin/deluge", line 136, in <module>
start_deluge()
File "/usr/bin/deluge", line 117, in start_deluge
interface = deluge.interface.DelugeGTK()
File "/var/lib/python-support/python2.5/deluge/interface.py", line 54, in __init__
common.CONFIG_DIR)
File "/var/lib/python-support/python2.5/deluge/core.py", line 276, in __init__
self.sync(True)
File "/var/lib/python-support/python2.5/deluge/core.py", line 860, in sync
for torrent in self.state.torrents:
RuntimeError: dictionary changed size during iteration
Code: Select all
--- /a/core.py 2007-12-01 07:13:05.000000000 +0100
+++ /b/core.py 2007-12-20 17:38:06.000000000 +0100
@@ -856,12 +856,20 @@ Space:") + " " + nice_free)
ret = None # We return new added unique ID(s), or None
no_space = False
- # Add torrents to core and unique_IDs
- for torrent in self.state.torrents:
+
+ # Hack to remove torrents
+ to_delete = []
+ for torrent in self.state.torrents:
if not os.path.exists(torrent.filename):
+ to_delete.append(torrent)
+
+ for torrent in to_delete:
print "Missing file: %s" % torrent.filename
- del self.state.torrents[torrent]
- continue
+ del self.state.torrents[torrent]
+ #End Hack
+
+ # Add torrents to core and unique_IDs
+ for torrent in self.state.torrents:
if torrent not in self.unique_IDs.values():
# print "Adding torrent to core:", torrent.filename, torrent.save_dir, torrent.compact
try:
Thanks!