From 85c32f0403b72c4be0fd453a0e9c1c187f1bd5dd Mon Sep 17 00:00:00 2001 From: John Garland Date: Thu, 2 Jul 2009 15:40:13 +0000 Subject: [PATCH] Use stored last_update for conditional get. --- deluge/plugins/blocklist/blocklist/core.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/deluge/plugins/blocklist/blocklist/core.py b/deluge/plugins/blocklist/blocklist/core.py index 6da808eb0..884ed3e13 100644 --- a/deluge/plugins/blocklist/blocklist/core.py +++ b/deluge/plugins/blocklist/blocklist/core.py @@ -179,10 +179,8 @@ class Core(CorePluginBase): if not url: url = self.config["url"] - blocklist = deluge.configmanager.get_config_dir("blocklist.cache") - if os.path.exists(blocklist) and not self.force_download: - last_modified = datetime.datetime.utcfromtimestamp(os.path.getmtime(blocklist)) - headers['If-Modified-Since'] = last_modified.strftime("%a, %d %b %Y %H:%M:%S GMT") + if self.config["last_update"] and not self.force_download: + headers['If-Modified-Since'] = self.config["last_update"] log.debug("Attempting to download blocklist %s", url) self.is_downloading = True