#NEWLINE# def _delete_dest_path_if_stale( master_path , dest_path ) : #NEWLINE# #INDENT# "Delete dest_path if it does not point to cached image.\n\n    :param master_path: path to an image in master cache\n    :param dest_path: hard link to an image\n    :returns: True if dest_path points to master_path, False if dest_path was\n        stale and was deleted or it didn't exist\n    " #NEWLINE# dest_path_exists = os . path . exists ( dest_path ) #NEWLINE# if ( not dest_path_exists ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# master_path_exists = os . path . exists ( master_path ) #NEWLINE# if ( ( not master_path_exists ) or ( os . stat ( master_path ) . st_ino != os . stat ( dest_path ) . st_ino ) ) : #NEWLINE# #INDENT# os . unlink ( dest_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# return True