Remove unnecessary repeat creation of Mastodon object

This commit is contained in:
jeancf 2023-02-06 20:41:51 +01:00
parent 38e505ad6e
commit faedf27a37

View File

@ -981,10 +981,10 @@ def main(argv):
# Post toot
toot = {}
try:
mastodon = Mastodon(
access_token=TOML['config']['mastodon_user'] + '.secret',
api_base_url='https://' + TOML['config']['mastodon_instance']
)
# mastodon = Mastodon(
# access_token=TOML['config']['mastodon_user'] + '.secret',
# api_base_url='https://' + TOML['config']['mastodon_instance']
# )
if len(media_ids) == 0:
toot = mastodon.status_post(tweet['tweet_text'])