def delete_backup_info(backup_info, delete_files=True):
 if backup_info.blob_files:
  delete_backup_files(backup_info.filesystem, backup_info.blob_files)
  backup_info.delete(force_writes=True)
 else:
  kinds_backup_files = tuple(backup_info.get_kind_backup_files())
  if delete_files:
   delete_backup_files(backup_info.filesystem, itertools.chain(*(kind_backup_files.files for kind_backup_files in kinds_backup_files)))
  db.delete((kinds_backup_files + (backup_info,)), force_writes=True)

def delete_backup_info ( backup_info , delete_files = True ) : if backup_info . blob_files : delete_backup_files ( backup_info . filesystem , backup_info . blob_files ) backup_info . delete ( force_writes = True ) else : kinds_backup_files = tuple ( backup_info . get_kind_backup_files ( ) ) if delete_files : delete_backup_files ( backup_info . filesystem , itertools . chain ( * ( kind_backup_files . files for kind_backup_files in kinds_backup_files ) ) ) db . delete ( ( kinds_backup_files + ( backup_info , ) ) , force_writes = True )
deletes a backup including its associated files and other metadata .