def site_directory_contains_stale_files(site_directory):
 if os.path.exists(site_directory):
  if os.listdir(site_directory):
   return True
 return False

def site_directory_contains_stale_files ( site_directory ) : if os . path . exists ( site_directory ) : if os . listdir ( site_directory ) : return True return False
check if the site directory contains stale files from a previous build .