From 959a3ec15e7bbce85eb79afc510961660c9ae70e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Jolliton?= Date: Wed, 25 Oct 2006 20:14:31 +0000 Subject: [PATCH] Fixed another attribute definition. Added __weakref__ to RC classes. --- rsbac/rc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rsbac/rc.py b/rsbac/rc.py index 1bf451a..a709296 100644 --- a/rsbac/rc.py +++ b/rsbac/rc.py @@ -790,7 +790,8 @@ def _type( t ) : return t class RoleBase( object ) : - __slots__ = ( '_role' , '_id' , + __slots__ = ( '__weakref__' , + '_role' , '_id' , 'compatibility' , 'adminRoles' , 'assignRoles' , 'typeCompatibility' , 'defaultIndividualFdCreateType' ) def __new__( cls , role ) : @@ -898,7 +899,6 @@ class RoleBase( object ) : return setRoleDefaultIndividualFdCreateType( self._role , type1 , type2 ) def delDefaultIndividualFdCreateType( self , type ) : return delRoleDefaultIndividualFdCreateType( self._role , type ) - defaultIndividualFdCreateType = None # # boot_role # @@ -1057,7 +1057,8 @@ def removeType( type ) : None , 0 ) ) class Type( object ) : - __slots__ = ( '__id' , ) + __slots__ = ( '__weakref__' , + '__id' , ) def __new__( cls , target , type ) : if hasattr( target , 'type' ) : target = target.type @@ -1172,7 +1173,7 @@ def newType( target , name , start = 0 ) : i += 1 class RcTypeDict( object ) : - __slots__ = () + __slots__ = ( 'target' , ) def __init__( self , target ) : self.target = target def keys( self ) : -- 2.20.1