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

This commit is contained in:
Andrew Resch 2010-03-29 10:57:29 -07:00
parent 7dff81b60b
commit ee9c7d1971
1 changed files with 4 additions and 0 deletions

View File

@ -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())