(action, recordtype, account, group)
Edit a local DirectoryService group.

  Args:
    action: dsedit group action parameter -a, -d
    recordtype: group, user
    account: username or groupname to be added/deleted
    group: target group to be modified
  Returns:
    Nothing
  Raises:
    DSException: Can't perform group edit
Edit a local DirectoryService group.
Edit a local DirectoryService group .
def EditLocalGroup(action, recordtype, account, group):
  """Edit a local DirectoryService group.

  Args:
    action: dsedit group action parameter -a, -d
    recordtype: group, user
    account: username or groupname to be added/deleted
    group: target group to be modified
  Returns:
    Nothing
  Raises:
    DSException: Can't perform group edit
  """
  if action in _EDITGROUPACTIONS:
    operation = _EDITGROUPACTIONS[action]
  else:
    raise DSException('Unsupported dseditgroup action %s' % action)

  cmd = [_DSEDITGROUP, '-o', 'edit', '-n', '.',
         operation, account, '-t', recordtype, group]
  (stdout, stderr, rc) = gmacpyutil.RunProcess(cmd)
  if rc is not 0:
    raise DSException('Error modifying group %s with %s %s -t %s,'
                      'returned %s\n%s' %
                      (group, operation, account, recordtype, stdout, stderr))
def EditLocalGroup ( action , recordtype , account , group ) : if action in _EDITGROUPACTIONS : operation = _EDITGROUPACTIONS [ action ] else : raise DSException ( 'Unsupported dseditgroup action %s' % action ) cmd = [ _DSEDITGROUP , '-o' , 'edit' , '-n' , '.' , operation , account , '-t' , recordtype , group ] ( stdout , stderr , rc ) = gmacpyutil . RunProcess ( cmd ) if rc is not 0 : raise DSException ( 'Error modifying group %s with %s %s -t %s,' 'returned %s\n%s' % ( group , operation , account , recordtype , stdout , stderr ) )