def get_valid_domains(domains):
 valid_domains = []
 for domain in domains:
  try:
   valid_domains.append(util.enforce_domain_sanity(domain))
  except errors.ConfigurationError:
   continue
 return valid_domains

def get_valid_domains ( domains ) : valid_domains = [ ] for domain in domains : try : valid_domains . append ( util . enforce_domain_sanity ( domain ) ) except errors . ConfigurationError : continue return valid_domains
helper method for choose_names that implements basic checks on domain names .