[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/RoleService - RoleService.py:1.1.4.2

Jim Fulton jim@zope.com
Mon, 10 Jun 2002 15:34:51 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/RoleService
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/App/OFS/Services/RoleService

Modified Files:
      Tag: Zope-3x-branch
	RoleService.py 
Log Message:
Implemented 

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification

Along the way:

- Converted most uses of has_key to use in.

- Fixed a bug in Interface names and namesAndDescriptions methods 
  that caused base class attributes to be missed.



=== Zope3/lib/python/Zope/App/OFS/Services/RoleService/RoleService.py 1.1.4.1 => 1.1.4.2 ===
     def getRole(wrapped_self, rid):
         '''See interface IRoleService'''
-        try: return wrapped_self.getObject(rid)
+        try: return wrapped_self[rid]
         except KeyError:
             # We failed locally: delegate to a higher-level service.
             sv= getNextService(wrapped_self, 'RoleService')
@@ -47,7 +47,7 @@
 
     def getRoles(wrapped_self):
         '''See interface IRoleService'''
-        roles = list(wrapped_self.objectValues())
+        roles = list(wrapped_self.values())
         roleserv=getNextService(wrapped_self, 'RoleService')
         if roleserv:
             roles.extend(roleserv.getRoles())