strip access tokens for ease of use

This commit is contained in:
Kay Faraday 2022-01-08 04:27:05 +00:00
parent f709bed0e9
commit 94a8b53f28
1 changed files with 2 additions and 2 deletions

View File

@ -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):