Handle empty passwords in URL credentials

Closes #242
This commit is contained in:
Jakub Roztocil
2014-07-18 13:38:33 +02:00
parent 0f96348fd1
commit ca36f1de04
3 changed files with 21 additions and 3 deletions

View File

@ -211,7 +211,8 @@ class Parser(ArgumentParser):
elif url.username is not None:
# Handle http://username:password@hostname/
username, password = url.username, url.password
username = url.username
password = url.password or ''
self.args.auth = AuthCredentials(
key=username,
value=password,