mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Remove unnecessary repeat creation of Mastodon object
This commit is contained in:
parent
38e505ad6e
commit
faedf27a37
8
twoot.py
8
twoot.py
|
@ -981,10 +981,10 @@ def main(argv):
|
||||||
# Post toot
|
# Post toot
|
||||||
toot = {}
|
toot = {}
|
||||||
try:
|
try:
|
||||||
mastodon = Mastodon(
|
# mastodon = Mastodon(
|
||||||
access_token=TOML['config']['mastodon_user'] + '.secret',
|
# access_token=TOML['config']['mastodon_user'] + '.secret',
|
||||||
api_base_url='https://' + TOML['config']['mastodon_instance']
|
# api_base_url='https://' + TOML['config']['mastodon_instance']
|
||||||
)
|
# )
|
||||||
|
|
||||||
if len(media_ids) == 0:
|
if len(media_ids) == 0:
|
||||||
toot = mastodon.status_post(tweet['tweet_text'])
|
toot = mastodon.status_post(tweet['tweet_text'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user