From 94a8b53f287578598b9c4ad2cff2673a852055ed Mon Sep 17 00:00:00 2001 From: Kay Faraday Date: Sat, 8 Jan 2022 04:27:05 +0000 Subject: [PATCH] strip access tokens for ease of use --- pleroma.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pleroma.py b/pleroma.py index 6b984e7..95c7b78 100644 --- a/pleroma.py +++ b/pleroma.py @@ -27,8 +27,8 @@ class LoginFailed(Exception): class Pleroma: def __init__(self, *, api_base_url, access_token): self.api_base_url = api_base_url.rstrip('/') - self.access_token = access_token - self._session = http_session_factory({'Authorization': 'Bearer ' + access_token}) + self.access_token = access_token.strip() + self._session = http_session_factory({'Authorization': 'Bearer ' + self.access_token}) self._logged_in_id = None async def __aenter__(self):