From 244ae878c9540afeadde4b3e9bfb7fa775eaa268 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 29 Sep 2015 23:09:11 +0100 Subject: [PATCH] [Core] Fix placement of self.state in torrent.py * Need to be created earlier as set_options calls update_state --- deluge/core/torrent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 7fa570f47..b7958ac6c 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -141,6 +141,9 @@ class Torrent(object): # Store the magnet uri used to add this torrent if available self.magnet = magnet + # Torrent state e.g. Paused, Downloading, etc. + self.state = None + # Holds status info so that we don't need to keep getting it from lt self.status = self.handle.status() @@ -191,7 +194,6 @@ class Torrent(object): self.statusmsg = "OK" # The torrents state - self.state = None self.update_state() # The tracker status