Ignore username:password part in url

This commit is contained in:
Pritam Baral 2014-05-28 07:10:10 +05:30
parent 52c6ba8880
commit dc071c4ea7

View File

@ -43,6 +43,8 @@ def parse_url(url):
return None return None
if not scheme: if not scheme:
return None return None
if '@' in netloc:
_, netloc = string.rsplit(netloc, '@', maxsplit=1)
if ':' in netloc: if ':' in netloc:
host, port = string.rsplit(netloc, ':', maxsplit=1) host, port = string.rsplit(netloc, ':', maxsplit=1)
try: try: