From 009361894040a8c008d89f344aedfd3975185364 Mon Sep 17 00:00:00 2001 From: oloturia <5429234+oloturia@users.noreply.github.com> Date: Fri, 12 Nov 2021 17:41:53 +0100 Subject: [PATCH] fixed login.py, now it can be called from another dir --- login.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/login.py b/login.py index b816ea6..1f857ac 100644 --- a/login.py +++ b/login.py @@ -1,8 +1,12 @@ from mastodon import Mastodon +import os + +fileDir = os.path.dirname(os.path.abspath(__file__)) +fileDir = fileDir +"/" def login(url): mastodon = Mastodon( - access_token = "DAMA.SECRET", + access_token = fileDir+"DAMA.SECRET", api_base_url = url ) return mastodon