[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/component/fields.py Fix, so that layers are found isntead of packages. This problem occured

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Sep 23 10:57:33 EDT 2004


Log message for revision 27660:
  Fix, so that layers are found isntead of packages. This problem occured 
  when layers and packages had the same name. Thanks to Gustavo Niemeyer for 
  the fix!
  


Changed:
  U   Zope3/trunk/src/zope/app/component/fields.py


-=-
Modified: Zope3/trunk/src/zope/app/component/fields.py
===================================================================
--- Zope3/trunk/src/zope/app/component/fields.py	2004-09-23 14:50:47 UTC (rev 27659)
+++ Zope3/trunk/src/zope/app/component/fields.py	2004-09-23 14:57:33 UTC (rev 27660)
@@ -11,11 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Browser configuration code
+"""Component-related fields
 
-This module defines the schemas for browser directives.
-
-$Id: metadirectives.py 26994 2004-08-11 10:07:39Z gintautasm $
+$Id$
 """
 __docformat__ = 'restructuredtext'
 
@@ -100,9 +98,8 @@
                 return value
 
         try:
-            value = self.context.resolve(name)
+            value = self.context.resolve('zope.app.layers.'+name)
         except ConfigurationError, v:
-            name = 'zope.app.layers.'+name
             try:
                 value = self.context.resolve(name)
             except ConfigurationError, v:



More information about the Zope3-Checkins mailing list