From db9b5580d7fe3d8a837569c570e780ae517b6691 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 21 Aug 2010 12:53:21 -0700 Subject: [PATCH 1/2] Fix issue where the save_timer is cancelled when it's not active --- deluge/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/config.py b/deluge/config.py index f7ad405e9..c2e760432 100644 --- a/deluge/config.py +++ b/deluge/config.py @@ -398,7 +398,7 @@ what is currently in the config and it could not convert the value loaded_data = json.loads(data[start:end]) if self.__config == loaded_data and self.__version == version: # The config has not changed so lets just return - if self._save_timer: + if self._save_timer and self._save_timer.active(): self._save_timer.cancel() return except IOError, e: From 8586cda4e01a0bebbb3491c3444a7ea071354e7f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 21 Aug 2010 12:53:44 -0700 Subject: [PATCH 2/2] Fix unhandled exception when adding a torrent to the session --- deluge/ui/sessionproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py index b0a79a5b4..3b3190b7b 100644 --- a/deluge/ui/sessionproxy.py +++ b/deluge/ui/sessionproxy.py @@ -241,9 +241,9 @@ class SessionProxy(component.Component): def on_torrent_added(self, torrent_id): self.torrents[torrent_id] = [time.time() - self.cache_time - 1, {}] + self.cache_times[torrent_id] = {} def on_status(status): self.torrents[torrent_id][1].update(status) - self.cache_times[torrent_id] = {} t = time.time() for key in status: self.cache_times[torrent_id][key] = t