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

This commit is contained in:
Andrew Resch 2010-06-30 16:21:34 -07:00
parent c1f137505a
commit e79461c7d2

View file

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