Compare commits

...

2 Commits

Author SHA1 Message Date
jeancf
e6af746c17 Corrected login issue 2022-11-24 09:33:31 +01:00
jeancf
c699e80e25 Corrected TOML key 2022-11-24 08:35:19 +01:00

View File

@ -333,6 +333,7 @@ def is_time_valid(timestamp):
def login(password):
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
if not os.path.isfile(instance + '.secret'):
try:
@ -355,11 +356,10 @@ def login(password):
)
mastodon.log_in(
username=TOML['options']['twitter_account'],
username=TOML['config']['mastodon_user'],
password=password,
to_file=TOML['options']['twitter_account'] + ".secret"
to_file=TOML['config']['mastodon_user'] + ".secret"
)
logging.info('Logging in to ' + instance)
except MastodonError as me:
logging.fatal('ERROR: Login to ' + instance + ' Failed')