Author: andar

Revision: 5202

Log:
        Return if bad torrent_info

Diff:
Modified: trunk/deluge/core/torrentmanager.py
===================================================================
--- trunk/deluge/core/torrentmanager.py 2009-04-27 22:02:26 UTC (rev 5201)
+++ trunk/deluge/core/torrentmanager.py 2009-04-27 22:14:49 UTC (rev 5202)
@@ -278,6 +278,8 @@
                 torrent_info = lt.torrent_info(lt.bdecode(filedump))
             except Exception, e:
                 log.error("Unable to decode torrent file!: %s", e)
+                # XXX: Probably should raise an exception here..
+                return
 
         if torrent_info is None and state:
             # We have no torrent_info so we need to add the torrent with 
information
@@ -751,7 +753,7 @@
             torrent = self.torrents[torrent_id]
         except:
             return
-            
+
         old_state = torrent.state
         torrent.update_state()
         # Only emit a state changed event if the state has actually changed



--~--~---------~--~----~------------~-------~--~----~
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