Fix parse_urls() buglets
When you expect split() to return 2 values, make sure to tell it to only do a single split.
This commit is contained in:
parent
29cb5b0b58
commit
1a8adfbceb
@ -91,8 +91,9 @@ def parse_url(url, default_exchange=None):
|
||||
continue
|
||||
|
||||
if "@" in host:
|
||||
creds, host = host.split("@")
|
||||
username, password = creds.split(":")
|
||||
username, host = host.split("@", 1)
|
||||
if ":" in username:
|
||||
username, password = username.split(":", 1)
|
||||
|
||||
hosts.append({
|
||||
"host": host,
|
||||
|
Loading…
x
Reference in New Issue
Block a user