mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-03-30 17:36:49 +00:00
Corrected login issue
This commit is contained in:
parent
c699e80e25
commit
e6af746c17
6
twoot.py
6
twoot.py
@ -333,6 +333,7 @@ def is_time_valid(timestamp):
|
|||||||
def login(password):
|
def login(password):
|
||||||
|
|
||||||
instance = TOML['config']['mastodon_instance']
|
instance = TOML['config']['mastodon_instance']
|
||||||
|
logging.info('Logging in to ' + instance + ' as ' + TOML['config']['twitter_account'])
|
||||||
# Create Mastodon application if it does not exist yet
|
# Create Mastodon application if it does not exist yet
|
||||||
if not os.path.isfile(instance + '.secret'):
|
if not os.path.isfile(instance + '.secret'):
|
||||||
try:
|
try:
|
||||||
@ -355,11 +356,10 @@ def login(password):
|
|||||||
)
|
)
|
||||||
|
|
||||||
mastodon.log_in(
|
mastodon.log_in(
|
||||||
username=TOML['config']['twitter_account'],
|
username=TOML['config']['mastodon_user'],
|
||||||
password=password,
|
password=password,
|
||||||
to_file=TOML['config']['twitter_account'] + ".secret"
|
to_file=TOML['config']['mastodon_user'] + ".secret"
|
||||||
)
|
)
|
||||||
logging.info('Logging in to ' + instance)
|
|
||||||
|
|
||||||
except MastodonError as me:
|
except MastodonError as me:
|
||||||
logging.fatal('ERROR: Login to ' + instance + ' Failed')
|
logging.fatal('ERROR: Login to ' + instance + ' Failed')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user