Author: andar

Revision: 5405

Log:
        Check to see if the files_list for the torrent_id is available when 
receiving file_renamed or 
folder_renamed events

Diff:
Modified: trunk/deluge/ui/gtkui/files_tab.py
===================================================================
--- trunk/deluge/ui/gtkui/files_tab.py  2009-06-23 10:02:22 UTC (rev 5404)
+++ trunk/deluge/ui/gtkui/files_tab.py  2009-06-23 17:36:01 UTC (rev 5405)
@@ -557,6 +557,10 @@
 
     def _on_torrentfilerenamed_event(self, torrent_id, index, name):
         log.debug("index: %s name: %s", index, name)
+
+        if torrent_id not in self.files_list:
+            return
+
         old_name = self.files_list[torrent_id][index]["path"]
         self.files_list[torrent_id][index]["path"] = name
 
@@ -705,6 +709,9 @@
         log.debug("on_torrent_folder_renamed_signal")
         log.debug("old_folder: %s new_folder: %s", old_folder, new_folder)
 
+        if torrent_id not in self.files_list:
+            return
+
         if old_folder[-1] != "/":
             old_folder += "/"
         if new_folder[-1] != "/":



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to