def _strip_basic_auth(url):
 frags = list(urlsplit(url))
 if ('@' in frags[1]):
  frags[1] = frags[1].split('@')[1]
 return urlunsplit(frags)

def _strip_basic_auth ( url ) : frags = list ( urlsplit ( url ) ) if ( '@' in frags [ 1 ] ) : frags [ 1 ] = frags [ 1 ] . split ( '@' ) [ 1 ] return urlunsplit ( frags )
returns *url* with basic auth credentials removed .