Author: johnnyg

Revision: 5439

Log:
        Use stored last_update for conditional get.

Diff:
Modified: trunk/deluge/plugins/blocklist/blocklist/core.py
===================================================================
--- trunk/deluge/plugins/blocklist/blocklist/core.py    2009-07-02 15:29:57 UTC 
(rev 5438)
+++ trunk/deluge/plugins/blocklist/blocklist/core.py    2009-07-02 15:40:13 UTC 
(rev 5439)
@@ -179,10 +179,8 @@
         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



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to