mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Meet @sigmavirus24's demanding stylistic criteria.
This commit is contained in:
+5
-3
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user