[CMF-checkins] SVN: CMF/trunk/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:27 EDT 2005


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

Changed:
  U   CMF/trunk/CMFCore/utils.py

-=-
Modified: CMF/trunk/CMFCore/utils.py
===================================================================
--- CMF/trunk/CMFCore/utils.py	2005-09-17 16:27:00 UTC (rev 38506)
+++ CMF/trunk/CMFCore/utils.py	2005-09-17 16:59:26 UTC (rev 38507)
@@ -344,6 +344,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