def set_challenge_for_url(url, challenge):
 if (not url):
  raise ValueError('URL cannot be empty')
 if (not challenge):
  raise ValueError('Challenge cannot be empty')
 src_url = parse.urlparse(url)
 if (src_url.netloc != challenge.source_authority):
  raise ValueError('Source URL and Challenge URL do not match')
 _cache[src_url.netloc] = challenge

def set_challenge_for_url ( url , challenge ) : if ( not url ) : raise ValueError ( 'URL cannot be empty' ) if ( not challenge ) : raise ValueError ( 'Challenge cannot be empty' ) src_url = parse . urlparse ( url ) if ( src_url . netloc != challenge . source_authority ) : raise ValueError ( 'Source URL and Challenge URL do not match' ) _cache [ src_url . netloc ] = challenge
caches the challenge for the specified url .