Remove needless whitespace strips (#1048)

This commit is contained in:
Taneli Hukkinen 2020-07-05 12:58:44 +03:00 committed by GitHub
parent 8dea2c23d7
commit 2f0e0480da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class BasicAuth(Auth):
self, username: typing.Union[str, bytes], password: typing.Union[str, bytes]
) -> str:
userpass = b":".join((to_bytes(username), to_bytes(password)))
token = b64encode(userpass).decode().strip()
token = b64encode(userpass).decode()
return f"Basic {token}"

View File

@ -355,7 +355,7 @@ class Proxy:
def build_auth_header(self, username: str, password: str) -> str:
userpass = (username.encode("utf-8"), password.encode("utf-8"))
token = b64encode(b":".join(userpass)).decode().strip()
token = b64encode(b":".join(userpass)).decode()
return f"Basic {token}"
def __repr__(self) -> str: