[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/group.py
Corrected test error for Group class if there is no __parent__
Amos Brocco
amos.brocco at mriyasoftware.com
Wed Oct 13 13:28:30 EDT 2004
Log message for revision 28117:
Corrected test error for Group class if there is no __parent__
Changed:
U Zope3/trunk/src/zope/security/group.py
-=-
Modified: Zope3/trunk/src/zope/security/group.py
===================================================================
--- Zope3/trunk/src/zope/security/group.py 2004-10-13 17:24:35 UTC (rev 28116)
+++ Zope3/trunk/src/zope/security/group.py 2004-10-13 17:28:29 UTC (rev 28117)
@@ -43,7 +43,8 @@
if not principalId in self.__principals:
tmpNewList.append(principalId)
self.setPrincipals(tmpNewList)
- self.__parent__.updateMappingForPrincipals(*principalIds)
+ if self.__parent__ is not None:
+ self.__parent__.updateMappingForPrincipals(*principalIds)
def removePrincipals(self, *principalIds):
tmpNewList = self.__principals
@@ -51,7 +52,8 @@
if principalId in tmpNewList:
tmpNewList.remove(principalId)
self.setPrincipals(tmpNewList)
- self.__parent__.updateMappingForPrincipals(*principalIds)
+ if self.__parent__ is not None:
+ self.__parent__.updateMappingForPrincipals(*principalIds)
def containsPrincipal(self, principalId):
return principalId in self.__principals
More information about the Zope3-Checkins
mailing list