mirror of
https://gitlab.com/oloturia/damastodon.git
synced 2025-01-07 22:17:15 +01:00
fixed login.py, now it can be called from another dir
This commit is contained in:
parent
af52f887fd
commit
0093618940
1 changed files with 5 additions and 1 deletions
6
login.py
6
login.py
|
@ -1,8 +1,12 @@
|
||||||
from mastodon import Mastodon
|
from mastodon import Mastodon
|
||||||
|
import os
|
||||||
|
|
||||||
|
fileDir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
fileDir = fileDir +"/"
|
||||||
|
|
||||||
def login(url):
|
def login(url):
|
||||||
mastodon = Mastodon(
|
mastodon = Mastodon(
|
||||||
access_token = "DAMA.SECRET",
|
access_token = fileDir+"DAMA.SECRET",
|
||||||
api_base_url = url
|
api_base_url = url
|
||||||
)
|
)
|
||||||
return mastodon
|
return mastodon
|
||||||
|
|
Loading…
Reference in a new issue