byref( userEntry ) , password ,
ttl ) )
# Let's hope that there are no race conditions at this point.
- return getUid( name )
+ return User( getUid( name ) )
@export
def addGroup( name , gid = None , password = None , ttl = None ) :
byref( groupEntry ) , password ,
ttl ) )
# Let's hope that there are no race conditions at this point.
- return getGid( name )
+ return Group( getGid( name ) )
@export
def addToGroups( uid , gid , ttl = None ) :
def __repr__( self ) :
return '<Groups for user %d: %s>' % ( self._uid , list( self ) or 'none' )
def add( self , gid , ttl = None ) :
- addToGroups( self._uid , gid , ttl )
+ addToGroups( self._uid , int( gid ) , ttl )
def discard( self , gid ) :
- removeFromGroups( self._uid , gid )
+ removeFromGroups( self._uid , int( gid ) )
def clear( self ) :
map( self.discard , self )