Skip to content
Myr

Order of type check

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Dmitry Klimenko · committed by GitHub · parent e514920 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:requests/auth.py+5 added-5 removed
26 unmodified lines
2728def _basic_auth_str(username, password):29 """Returns a Basic Auth string."""30 31 if isinstance(username, bytes):32 username = username.decode('latin1')31 if isinstance(username, str):32 username = username.encode('latin1')3334 if isinstance(password, bytes):35 password = password.decode('latin1')34 if isinstance(password, str):35 password = password.encode('latin1')3637 authstr = 'Basic ' + to_native_string(38 b64encode(('%s:%s' % (username, password)).encode('latin1')).strip()38 b64encode(b':'.join((username, password))).strip()39 )4041 return authstr42
217 unmodified lines