def make_next_param(login_url, current_url):
 l = urlparse(login_url)
 c = urlparse(current_url)
 if (((not l.scheme) or (l.scheme == c.scheme)) and ((not l.netloc) or (l.netloc == c.netloc))):
  return urlunparse(('', '', c.path, c.params, c.query, ''))
 return current_url

def make_next_param ( login_url , current_url ) : l = urlparse ( login_url ) c = urlparse ( current_url ) if ( ( ( not l . scheme ) or ( l . scheme == c . scheme ) ) and ( ( not l . netloc ) or ( l . netloc == c . netloc ) ) ) : return urlunparse ( ( '' , '' , c . path , c . params , c . query , '' ) ) return current_url
reduces the scheme and host from a given url so it can be passed to the given login url more efficiently .