def delete_dataset_temp_folder():
    global temp_workspace

    # Delete the file geodatabase separately before deleting the
    # directory to release the locks    
    name = get_dataset_filename()
    gdb_folder = os.path.join(temp_workspace,'gdb')    
    gdb_file = os.path.join(gdb_folder, name + '.gdb')
    
    logger.debug('Deleting file geodatabase:' + gdb_file)
    if os.path.exists(gdb_file):
        arcpy.Delete_management(gdb_file)

    dataset_directory = os.path.join(temp_workspace, name)
    if os.path.exists(dataset_directory):                
        logger.debug('Deleting directory ' + dataset_directory)
        shutil.rmtree(dataset_directory)
Validate samples
dataset/ETHPy150Open opencolorado/OpenColorado-Tools-and-Utilities/Scripts/ArcGIS/10.0/Python/PublishOpenDataset.py/delete_dataset_temp_folder--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/scripts/dbm/show_samples.py/validate_all_samples