[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - fileresource.py:1.1.2.4 globalbrowsermenuservice.py:1.1.2.4 i18nfileresource.py:1.1.2.3 i18nresourcemeta.py:1.1.2.3 metaconfigure.py:1.1.2.3 resource.py:1.1.2.3 resourcemeta.py:1.1.2.3 resources.py:1.1.2.4

Tim Peters tim.one@comcast.net
Tue, 24 Dec 2002 21:21:41 -0500


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/publisher/browser

Modified Files:
      Tag: NameGeddon-branch
	fileresource.py globalbrowsermenuservice.py 
	i18nfileresource.py i18nresourcemeta.py metaconfigure.py 
	resource.py resourcemeta.py resources.py 
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py.  The
files are fixed-points of that script now.  Fixed a few cases where
code relied on significant trailing whitespace (ouch).


=== Zope3/src/zope/app/publisher/browser/fileresource.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/publisher/browser/fileresource.py:1.1.2.3	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/fileresource.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -97,7 +97,7 @@
         f=open(file.path,'rb')
         data=f.read()
         f.close()
-        
+
         return data
 
     def HEAD(self):
@@ -109,7 +109,7 @@
         # Cache for one day
         response.setHeader('Cache-Control', 'public,max-age=86400')
         return ''
-    
+
 
 class FileResourceFactory:
 


=== Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py:1.1.2.3	Tue Dec 24 12:23:20 2002
+++ Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 
 from zope.app.interfaces.publisher.browser import IBrowserMenuService
@@ -33,7 +33,7 @@
         self._registry = {}
 
     _clear = __init__
-        
+
     def menu(self, menu_id, title, description=''):
         # XXX we have nothing to do with the title and description. ;)
 
@@ -62,7 +62,7 @@
 
         result = []
         seen = {}
-        
+
         for items in registry.getAllForObject(object):
             for action, title, description, filter in items:
 
@@ -70,9 +70,9 @@
                 if title in seen:
                     continue
                 seen[title] = 1
-                
+
                 if filter is not None:
-                    
+
                     try:
                         include = filter(Engine.getContext(
                             context = object,
@@ -82,7 +82,7 @@
 
                     if not include:
                         continue
-   
+
                 if action:
                     try:
                         v = traverser.traverseRelativeURL(
@@ -109,7 +109,7 @@
 
                 if len(result) >= max:
                     return result
-        
+
         return result
 
     def getFirstMenuItem(self, menu_id, object, request):
@@ -128,9 +128,9 @@
 def menuItemDirective(_context, menu, for_,
                       action, title, description='', filter=None):
     return menuItemsDirective(_context, menu, for_).menuItem(
-        _context, action, title, description, filter)        
+        _context, action, title, description, filter)
+
 
-    
 class menuItemsDirective:
 
     __class_implements__ = INonEmptyDirective
@@ -150,7 +150,7 @@
                       action, title, description, filter),
               ),
                 ]
-        
+
     def __call__(self):
         return [
             Action(


=== Zope3/src/zope/app/publisher/browser/i18nfileresource.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/publisher/browser/i18nfileresource.py:1.1.2.2	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/i18nfileresource.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 Internationalized file resource.
@@ -92,4 +92,3 @@
 
     def __call__(self, request):
         return I18nFileResource(self.__data, request, self.__defaultLanguage)
-


=== Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py:1.1.2.2	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """Browser configuration code
 
@@ -125,7 +125,7 @@
             resource = factory(request)
 
             # We need this in case the resource gets unwrapped and
-            # needs to be rewrapped 
+            # needs to be rewrapped
             resource.__Security_checker__ = checker
 
             return Proxy(resource, checker)


=== Zope3/src/zope/app/publisher/browser/metaconfigure.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/publisher/browser/metaconfigure.py:1.1.2.2	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/metaconfigure.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """Browser configuration code
 
@@ -63,6 +63,6 @@
                 for_)
               )
         )
-        
+
 
     return actions


=== Zope3/src/zope/app/publisher/browser/resource.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/publisher/browser/resource.py:1.1.2.2	Mon Dec 23 18:52:34 2002
+++ Zope3/src/zope/app/publisher/browser/resource.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -49,7 +49,7 @@
             return "/%s@@/%s" % (skin, name)
 
         site_url = absolute_url()
-        
+
         return "%s/%s@@/%s" % (site_url, skin, name)
 
     __call__ = ContextMethod(__call__)


=== Zope3/src/zope/app/publisher/browser/resourcemeta.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/publisher/browser/resourcemeta.py:1.1.2.2	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/resourcemeta.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """Browser configuration code
 
@@ -75,7 +75,7 @@
                 "Can't use more than one of factory, file, and image "
                 "attributes for resource directives"
                 )
-            
+
         if factory is not None:
             return _context.resolve(factory)
 
@@ -89,7 +89,7 @@
             "At least one of the factory, file, and image "
             "attributes for resource directives must be specified"
             )
-        
+
 
     def page(self, _context, name, attribute, permission=None,
              layer=None, factory=None):
@@ -118,7 +118,7 @@
     def _args(self, name, factory, layer):
         return ('Resources', 'provideResource',
                 name, self.type, factory, layer)
-        
+
     def _pageFactory(self, factory, attribute, permission):
         if permission:
             if permission == 'zope.Public':
@@ -150,10 +150,10 @@
         if permission:
             if require is None:
                 require = {}
-                
+
             if permission == 'zope.Public':
                 permission = CheckerPublic
-            
+
             if ((not allowed_attributes) and (allowed_interface is None)
                 and (not self.pages)):
                 allowed_attributes = self.default_allowed_attributes
@@ -185,7 +185,7 @@
             resource = factory(request)
 
             # We need this in case the resource gets unwrapped and
-            # needs to be rewrapped 
+            # needs to be rewrapped
             resource.__Security_checker__ = checker
 
             return Proxy(resource, checker)


=== Zope3/src/zope/app/publisher/browser/resources.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/publisher/browser/resources.py:1.1.2.3	Tue Dec 24 07:51:12 2002
+++ Zope3/src/zope/app/publisher/browser/resources.py	Tue Dec 24 21:20:40 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """Resource URL acess
 
@@ -32,7 +32,7 @@
 
     def publishTraverse(wrapped_self, request, name):
         '''See interface IBrowserPublisher'''
-        
+
         resource_service = getService(wrapped_self, 'Resources')
         resource = resource_service.queryResource(wrapped_self, name, request)
         if resource is None:
@@ -44,7 +44,7 @@
     def browserDefault(self, request):
         '''See interface IBrowserPublisher'''
         return empty, ()
-        
+
     #
     ############################################################