[Checkins] SVN: five.grok/trunk/ Port fix to grokcore.view to avoid registering 'static' resource directories for directories that don't exist

Martin Aspeli optilude at gmx.net
Thu Apr 9 11:54:09 EDT 2009


Log message for revision 99043:
  Port fix to grokcore.view to avoid registering 'static' resource directories for directories that don't exist

Changed:
  U   five.grok/trunk/docs/HISTORY.txt
  U   five.grok/trunk/src/five/grok/meta.py

-=-
Modified: five.grok/trunk/docs/HISTORY.txt
===================================================================
--- five.grok/trunk/docs/HISTORY.txt	2009-04-09 15:53:41 UTC (rev 99042)
+++ five.grok/trunk/docs/HISTORY.txt	2009-04-09 15:54:09 UTC (rev 99043)
@@ -4,7 +4,9 @@
 five.grok - 1.0b1 (unreleased)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-* ...
+* Do not create static resource directories if the 'static' directory does
+  not actually exist.
+  [optilude]
 
 five.grok - 1.0a2 (2008-11-23)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: five.grok/trunk/src/five/grok/meta.py
===================================================================
--- five.grok/trunk/src/five/grok/meta.py	2009-04-09 15:53:41 UTC (rev 99042)
+++ five.grok/trunk/src/five/grok/meta.py	2009-04-09 15:54:09 UTC (rev 99043)
@@ -110,6 +110,10 @@
         if not module_info.isPackage():
             return False
         resource_path = _get_resource_path(module_info, 'static')
+        
+        if not os.path.exists(resource_path):
+            return False
+        
         name = module_info.dotted_name
         layer = IDefaultBrowserLayer
         return _register_resource(config, resource_path, name, layer)



More information about the Checkins mailing list