[Zope-CVS] CVS: Products/PluggableAuthService - PluggableAuthService.py:1.18.2.4

Zachery Bir zbir at urbanape.com
Thu Oct 14 12:21:07 EDT 2004


Update of /cvs-repository/Products/PluggableAuthService
In directory cvs.zope.org:/tmp/cvs-serv24302

Modified Files:
      Tag: pre-1_0_3-zbir-challenge-branch
	PluggableAuthService.py 
Log Message:
cleaned up trailing whitespace


=== Products/PluggableAuthService/PluggableAuthService.py 1.18.2.3 => 1.18.2.4 ===
--- Products/PluggableAuthService/PluggableAuthService.py:1.18.2.3	Thu Oct 14 12:06:04 2004
+++ Products/PluggableAuthService/PluggableAuthService.py	Thu Oct 14 12:21:06 2004
@@ -79,7 +79,7 @@
                                  , KeyError
                                  , TypeError
                                  , ValueError
-                                 ) 
+                                 )
 
 security.declarePublic( 'MANGLE_DELIMITER' )
 MANGLE_DELIMITER = '__'
@@ -196,7 +196,7 @@
         if not user_id:
             return None
 
-        return self._findUser( plugins, user_id, name 
+        return self._findUser( plugins, user_id, name
                            # , cache=self._getUserCache()
                              )
 
@@ -221,7 +221,7 @@
                                                      , exact_match=True )
                     assert( len( user_info ) in [ 0, 1 ] )
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'UserEnumerationPlugin %s error' % plugin_id,
                         error=sys.exc_info())
                 else:
@@ -252,7 +252,7 @@
         , name
         , value
         ) = self._getObjectContext( request[ 'PUBLISHED' ], request )
-        
+
         for user_id, login in user_ids:
 
             user = self._findUser( plugins, user_id, login
@@ -323,7 +323,7 @@
                     else:
                         return ()
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'UserEnumerationPlugin %s error' % plugin_id,
                         error=sys.exc_info())
                     return ()
@@ -332,7 +332,7 @@
         max_results = kw.get('max_results', '')
         sort_by = kw.get('sort_by', '')
 
-        # We apply sorting and slicing here across all sets, so don't 
+        # We apply sorting and slicing here across all sets, so don't
         # make the plugin do it
         if sort_by:
             del kw['sort_by']
@@ -359,7 +359,7 @@
                     result.append(info)
 
             except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                LOG('PluggableAuthService', WARNING, 
+                LOG('PluggableAuthService', WARNING,
                     'UserEnumerationPlugin %s error' % enumerator_id,
                     error=sys.exc_info())
 
@@ -405,7 +405,7 @@
                     else:
                         return ()
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'GroupEnumerationPlugin %s error' % plugin_id,
                         error=sys.exc_info())
                     return ()
@@ -414,7 +414,7 @@
         max_results = kw.get('max_results', '')
         sort_by = kw.get('sort_by', '')
 
-        # We apply sorting and slicing here across all sets, so don't 
+        # We apply sorting and slicing here across all sets, so don't
         # make the plugin do it
         if sort_by:
             del kw['sort_by']
@@ -440,7 +440,7 @@
                     info[ 'title' ] = "(Group) %s" % info[ 'groupid' ]
                     result.append(info)
             except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                LOG('PluggableAuthService', WARNING, 
+                LOG('PluggableAuthService', WARNING,
                     'GroupEnumerationPlugin %s error' % enumerator_id,
                     error=sys.exc_info())
 
@@ -508,7 +508,7 @@
                     else:
                         return ()
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'UserEnumeratePlugin %s error' % plugin_id,
                         error=sys.exc_info())
                     return ()
@@ -650,7 +650,7 @@
         try:
             extractors = plugins.listPlugins( IExtractionPlugin )
         except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-            LOG('PluggableAuthService', WARNING, 
+            LOG('PluggableAuthService', WARNING,
                 'Plugin listing error',
                 error=sys.exc_info())
             extractors = ()
@@ -661,7 +661,7 @@
         try:
             authenticators = plugins.listPlugins( IAuthenticationPlugin )
         except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-            LOG('PluggableAuthService', WARNING, 
+            LOG('PluggableAuthService', WARNING,
                 'Plugin listing error',
                 error=sys.exc_info())
             authenticators = ()
@@ -671,7 +671,7 @@
             try:
                 credentials = extractor.extractCredentials( request )
             except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                LOG('PluggableAuthService', WARNING, 
+                LOG('PluggableAuthService', WARNING,
                     'ExtractionPlugin %s error' % extractor_id,
                     error=sys.exc_info())
                 continue
@@ -685,7 +685,7 @@
                     items.sort()
                     cache_key = tuple( items )
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'Credentials error: %s' % credentials,
                         error=sys.exc_info())
                     cache_key = None
@@ -696,7 +696,7 @@
 
                     # first try to authenticate against the emergency
                     # user, and return immediately if authenticated
-                    user_id, name = self._tryEmergencyUserAuthentication( 
+                    user_id, name = self._tryEmergencyUserAuthentication(
                                                                 credentials )
 
                     if user_id is not None:
@@ -705,12 +705,12 @@
                     for authenticator_id, auth in authenticators:
 
                         try:
-                            user_id, name = auth.authenticateCredentials( 
-                                                                credentials ) 
+                            user_id, name = auth.authenticateCredentials(
+                                                                credentials )
                         except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                            LOG('PluggableAuthService', WARNING, 
-                                'AuthenticationPlugin %s error' % authenticator_id,
-                                error=sys.exc_info())
+                            LOG('PluggableAuthService', WARNING,
+                                'AuthenticationPlugin %s error' %
+                                authenticator_id, error=sys.exc_info())
                             continue
 
                         if user_id is not None:
@@ -725,7 +725,7 @@
                 result.extend( user_ids )
 
         if not user_ids:
-            user_id, name = self._tryEmergencyUserAuthentication( 
+            user_id, name = self._tryEmergencyUserAuthentication(
                     DumbHTTPExtractor().extractCredentials( request ) )
 
             if user_id is not None:
@@ -760,7 +760,7 @@
             eua = EmergencyUserAuthenticator()
             user_id, name = eua.authenticateCredentials( credentials )
         except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-            LOG('PluggableAuthService', WARNING, 
+            LOG('PluggableAuthService', WARNING,
                 'Credentials error: %s' % credentials,
                 error=sys.exc_info())
             user_id, name = ( None, None )
@@ -906,7 +906,7 @@
                         return self._computeMangledId( info[0] )
 
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'UserEnumerationPlugin %s error' % enumerator_id,
                         error=sys.exc_info())
 
@@ -1058,7 +1058,7 @@
                 try:
                     roleassigner.doAssignRoleToPrincipal( user.getId(), role )
                 except _SWALLOWABLE_PLUGIN_EXCEPTIONS:
-                    LOG('PluggableAuthService', WARNING, 
+                    LOG('PluggableAuthService', WARNING,
                         'RoleAssigner %s error' % roleassigner_id,
                         error=sys.exc_info())
                     pass
@@ -1093,7 +1093,7 @@
             BeforeTraverse.registerBeforeTraverse(container, nc, handle)
 
     def __call__(self, container, req):
-        """ The __before_publishing_traverse__ hook. 
+        """ The __before_publishing_traverse__ hook.
         """
         resp = req['RESPONSE']
         req._hold(ResponseCleanup(resp))
@@ -1169,7 +1169,7 @@
     ( IExtractionPlugin
     , 'IExtractionPlugin'
     , 'extraction'
-    , "Extraction plugins are responsible for extracting credentials " 
+    , "Extraction plugins are responsible for extracting credentials "
       "from the request."
     )
   , ( IAuthenticationPlugin
@@ -1277,7 +1277,7 @@
                                 '%s/manage_workspace'
                                 '?manage_tabs_message='
                                 'PluggableAuthService+added.'
-                              % dispatcher.absolute_url() ) 
+                              % dispatcher.absolute_url() )
 
 class ResponseCleanup:
     def __init__(self, resp):



More information about the Zope-CVS mailing list