projects
/
platform
/
upstream
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dddb41e
)
Meet @sigmavirus24's demanding stylistic criteria.
author
Cory Benfield
<lukasaoz@gmail.com>
Sun, 12 Jan 2014 09:39:32 +0000
(09:39 +0000)
committer
Cory Benfield
<lukasaoz@gmail.com>
Sun, 12 Jan 2014 09:39:32 +0000
(09:39 +0000)
requests/utils.py
patch
|
blob
|
history
diff --git
a/requests/utils.py
b/requests/utils.py
index
13b649d
..
528e7c9
100644
(file)
--- a/
requests/utils.py
+++ b/
requests/utils.py
@@
-638,11
+638,13
@@
def get_auth_from_url(url):
parsed = urlparse(url)
try:
-
return
(unquote(parsed.username), unquote(parsed.password))
+
auth =
(unquote(parsed.username), unquote(parsed.password))
except (AttributeError, TypeError):
- pass
+ auth = ('', '')
+ else:
+ auth = ('', '')
- return
('', '')
+ return
auth
def to_native_string(string, encoding='ascii'):