Module: deluge
Branch: master
Commit: ee9c7d19711069054509bf66ffb4fb491e365b0c

Author: Andrew Resch <[email protected]>
Date:   Mon Mar 29 10:57:29 2010 -0700

Fix #1202 set self.state during instantiation regardless of the libtorrent state

---

 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 aa30823..f9f80ca 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -339,6 +339,10 @@ class Torrent(object):
         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