Module: deluge
Branch: 1.2-stable
Commit: e79461c7d2037820e4f51c00b21647d16dc87bd6

Author: Andrew Resch <[email protected]>
Date:   Wed Jun 30 16:21:34 2010 -0700

Fix issue where a new lt state will cause an uncaught exception

---

 deluge/core/torrent.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index b01a971..27989b8 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -331,6 +331,10 @@ class Torrent:
         LTSTATE = deluge.common.LT_TORRENT_STATE
         ltstate = int(self.handle.status().state)
 
+        # Set self.state to the ltstate right away just incase we don't hit 
some
+        # of the logic below
+        self.state = str(ltstate)
+
         log.debug("set_state_based_on_ltstate: %s", 
deluge.common.LT_TORRENT_STATE[ltstate])
         log.debug("session.is_paused: %s", 
component.get("Core").session.is_paused())
 

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