[Checkins] SVN: zc.buildout/branches/tlotze-download-api/src/zc/buildout/download. interpret specified but empty download-cache option as 'don't use the cache'

Thomas Lotze tl at gocept.com
Thu May 28 02:54:28 EDT 2009


Log message for revision 100496:
  interpret specified but empty download-cache option as 'don't use the cache'

Changed:
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.py
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.txt

-=-
Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.py	2009-05-27 22:59:18 UTC (rev 100495)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.py	2009-05-28 06:54:27 UTC (rev 100496)
@@ -67,7 +67,7 @@
         """
         self.use_cache = use_cache
         self.namespace = namespace
-        if use_cache and 'download-cache' in self.buildout:
+        if use_cache and self.buildout.get('download-cache'):
             self.cache = os.path.join(self.buildout['download-cache'],
                                       namespace or '')
         else:

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.txt
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.txt	2009-05-27 22:59:18 UTC (rev 100495)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/download.txt	2009-05-28 06:54:27 UTC (rev 100496)
@@ -98,6 +98,14 @@
 >>> print download.cache
 None
 
+>>> download = Download({'download-cache': None})
+>>> print download.cache
+None
+
+>>> download = Download({'download-cache': ''})
+>>> print download.cache
+None
+
 >>> download = Download({'download-cache': cache}, use_cache=False)
 >>> print download.cache
 None



More information about the Checkins mailing list