[CMF-checkins] SVN: CMF/branches/1.5/CMFCore/utils.py - Don't blow up if a portal does not have a caching policy manager

Jens Vagelpohl jens at dataflake.org
Sat Sep 17 12:59:55 EDT 2005


Log message for revision 38508:
  - Don't blow up if a portal does not have a caching policy manager
  

Changed:
  U   CMF/branches/1.5/CMFCore/utils.py

-=-
Modified: CMF/branches/1.5/CMFCore/utils.py
===================================================================
--- CMF/branches/1.5/CMFCore/utils.py	2005-09-17 16:59:26 UTC (rev 38507)
+++ CMF/branches/1.5/CMFCore/utils.py	2005-09-17 16:59:55 UTC (rev 38508)
@@ -399,6 +399,9 @@
         return False
 
     manager = getToolByName(obj, 'caching_policy_manager', None)
+    if manager is None:
+        return False
+
     ret = manager.getModTimeAndETag(aq_parent(obj), obj.getId(), extra_context)
     if ret is None:
         # no appropriate policy or 304s not enabled



More information about the CMF-checkins mailing list