(dstype, objectname, attribute=None, value=None)
DirectoryServices attribute delete.

  Args:
    dstype: The type of objects to delete. user, group.
    objectname: the object to delete.
    attribute: the attribute to delete.
    value: the value to delete
  Raises:
    DSException: Cannot modify DirectoryServices.
DirectoryServices attribute delete.
DirectoryServices attribute delete .
def DSDelete(dstype, objectname, attribute=None, value=None):
  """DirectoryServices attribute delete.

  Args:
    dstype: The type of objects to delete. user, group.
    objectname: the object to delete.
    attribute: the attribute to delete.
    value: the value to delete
  Raises:
    DSException: Cannot modify DirectoryServices.
  """
  ds_path = '/%ss/%s' % (dstype.capitalize(), objectname)
  cmd = [_DSCL, '.', '-delete', ds_path]
  if attribute:
    cmd.append(attribute)
    if value:
      cmd.extend([value])
  (unused_stdout, stderr, returncode) = gmacpyutil.RunProcess(cmd)
  if returncode:
    raise DSException('Cannot delete %s for %s: %s' % (attribute,
                                                       ds_path,
                                                       stderr))
def DSDelete ( dstype , objectname , attribute = None , value = None ) : ds_path = '/%ss/%s' % ( dstype . capitalize ( ) , objectname ) cmd = [ _DSCL , '.' , '-delete' , ds_path ] if attribute : cmd . append ( attribute ) if value : cmd . extend ( [ value ] ) ( unused_stdout , stderr , returncode ) = gmacpyutil . RunProcess ( cmd ) if returncode : raise DSException ( 'Cannot delete %s for %s: %s' % ( attribute , ds_path , stderr ) )