diff options
author | John Garland <johnnyg@gmail.com> | 2009-12-16 13:46:39 +0000 |
---|---|---|
committer | John Garland <johnnyg@gmail.com> | 2009-12-16 13:46:39 +0000 |
commit | fe6c89a2e10f5080a17731f1fa3a548e3622180b (patch) | |
tree | f2cfb00b17fc309263f2a95a057be14fdf1d12f2 | |
parent | 3c5d5aa16edbfb6638941cf88c330dcae2f36d9b (diff) | |
download | deluge-fe6c89a2e10f5080a17731f1fa3a548e3622180b.tar.gz deluge-fe6c89a2e10f5080a17731f1fa3a548e3622180b.tar.bz2 deluge-fe6c89a2e10f5080a17731f1fa3a548e3622180b.zip |
Upgrade older confs instead of just dying.
Fix major logic error when checking if an update is needed.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | deluge/plugins/blocklist/blocklist/core.py | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -51,6 +51,7 @@ ==== Blocklist ==== * Fix blocklist not working for all locales + * Fix blocklist checking for updates when it shouldn't === Deluge 1.2.0_rc4 (24 November 2009) === ==== Core ==== diff --git a/deluge/plugins/blocklist/blocklist/core.py b/deluge/plugins/blocklist/blocklist/core.py index f525b6059..e87cb55f0 100644 --- a/deluge/plugins/blocklist/blocklist/core.py +++ b/deluge/plugins/blocklist/blocklist/core.py @@ -87,13 +87,16 @@ class Core(CorePluginBase): self.reader = create_reader(self.config["list_type"], self.config["list_compression"]) + if type(self.config["last_update"]) is not float: + self.config.config["last_update"] = 0.0 + update_now = False if self.config["load_on_start"]: if self.config["last_update"]: now = datetime.now() last_update = datetime.fromtimestamp(self.config["last_update"]) check_period = timedelta(days=self.config["check_after_days"]) - if not self.config["last_update"] or last_update + check_period >= now: + if not self.config["last_update"] or last_update + check_period < now: update_now = True else: self.use_cache = True |