VirtualMailManager/handler.py
branchv0.7.x
changeset 670 f374ef062c94
parent 653 cf07e4468934
child 676 2bc11dada296
equal deleted inserted replaced
669:d765a878f0fc 670:f374ef062c94
   343         Arguments:
   343         Arguments:
   344 
   344 
   345         `domdir` : basestring
   345         `domdir` : basestring
   346           The directory of the domain the user belongs to
   346           The directory of the domain the user belongs to
   347           (commonly AccountObj.domain.directory)
   347           (commonly AccountObj.domain.directory)
   348         `uid` : int/long
   348         `uid` : int
   349           The user's UID (commonly AccountObj.uid)
   349           The user's UID (commonly AccountObj.uid)
   350         `gid` : int/long
   350         `gid` : int
   351           The user's GID (commonly AccountObj.gid)
   351           The user's GID (commonly AccountObj.gid)
   352         """
   352         """
   353         assert all(isinstance(xid, int) for xid in (uid, gid)) and \
   353         assert all(isinstance(xid, int) for xid in (uid, gid)) and \
   354                 isinstance(domdir, str)
   354                 isinstance(domdir, str)
   355         if uid < MIN_UID or gid < MIN_GID:
   355         if uid < MIN_UID or gid < MIN_GID:
   380 
   380 
   381         Arguments:
   381         Arguments:
   382 
   382 
   383         `domdir` : basestring
   383         `domdir` : basestring
   384           The domain's directory (commonly DomainObj.directory)
   384           The domain's directory (commonly DomainObj.directory)
   385         `gid` : int/long
   385         `gid` : int
   386           The domain's GID (commonly DomainObj.gid)
   386           The domain's GID (commonly DomainObj.gid)
   387         """
   387         """
   388         assert isinstance(domdir, str) and isinstance(gid, int)
   388         assert isinstance(domdir, str) and isinstance(gid, int)
   389         if gid < MIN_GID:
   389         if gid < MIN_GID:
   390             raise VMMError(_("GID '%(gid)u' is less than '%(min_gid)u'.") %
   390             raise VMMError(_("GID '%(gid)u' is less than '%(min_gid)u'.") %