def invalidate_hash(suffix_dir):
 suffix = basename(suffix_dir)
 partition_dir = dirname(suffix_dir)
 invalidations_file = join(partition_dir, HASH_INVALIDATIONS_FILE)
 with lock_path(partition_dir):
  with open(invalidations_file, 'ab') as inv_fh:
   inv_fh.write((suffix + '\n'))

def invalidate_hash ( suffix_dir ) : suffix = basename ( suffix_dir ) partition_dir = dirname ( suffix_dir ) invalidations_file = join ( partition_dir , HASH_INVALIDATIONS_FILE ) with lock_path ( partition_dir ) : with open ( invalidations_file , 'ab' ) as inv_fh : inv_fh . write ( ( suffix + '\n' ) )
invalidates the hash for a suffix_dir in the partitions hashes file .