def _validate_thumbnail_currentness(image_path, thumbnail_path):
 if ((not os.path.exists(thumbnail_path)) or (image_path == thumbnail_path)):
  return
 try:
  if (os.path.getmtime(image_path) > os.path.getmtime(thumbnail_path)):
   os.remove(thumbnail_path)
 except:
  pass

def _validate_thumbnail_currentness ( image_path , thumbnail_path ) : if ( ( not os . path . exists ( thumbnail_path ) ) or ( image_path == thumbnail_path ) ) : return try : if ( os . path . getmtime ( image_path ) > os . path . getmtime ( thumbnail_path ) ) : os . remove ( thumbnail_path ) except : pass
remove the thumbnail if it is outdated .