From ee9c7d19711069054509bf66ffb4fb491e365b0c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 29 Mar 2010 10:57:29 -0700 Subject: [PATCH] Fix #1202 set self.state during instantiation regardless of the libtorrent state --- deluge/core/torrent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index aa30823f8..f9f80ca7a 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())