@db.non_transactional
def drop_empty_files(filenames):
 non_empty_filenames = []
 empty_file_keys = []
 blobs_info = blobstore.BlobInfo.get([files.blobstore.get_blob_key(fn) for fn in filenames])
 for (filename, blob_info) in itertools.izip(filenames, blobs_info):
  if blob_info:
   if (blob_info.size > 0):
    non_empty_filenames.append(filename)
   else:
    empty_file_keys.append(blob_info.key())
 blobstore_api.delete(empty_file_keys)
 return non_empty_filenames

@ db . non_transactional def drop_empty_files ( filenames ) : non_empty_filenames = [ ] empty_file_keys = [ ] blobs_info = blobstore . BlobInfo . get ( [ files . blobstore . get_blob_key ( fn ) for fn in filenames ] ) for ( filename , blob_info ) in itertools . izip ( filenames , blobs_info ) : if blob_info : if ( blob_info . size > 0 ) : non_empty_filenames . append ( filename ) else : empty_file_keys . append ( blob_info . key ( ) ) blobstore_api . delete ( empty_file_keys ) return non_empty_filenames
deletes empty files and returns filenames minus the deleted ones .