mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Make sure we are logged to get max_characters
This commit is contained in:
parent
a50a077cd3
commit
b6396f7b51
15
twoot.py
15
twoot.py
|
@ -1150,13 +1150,14 @@ def main(argv):
|
||||||
mastodon = login(mast_password)
|
mastodon = login(mast_password)
|
||||||
|
|
||||||
# Check toot character limit on mastodon instance
|
# Check toot character limit on mastodon instance
|
||||||
try:
|
if mastodon is not None:
|
||||||
max_characters = mastodon.instance().configuration.statuses['max_characters']
|
try:
|
||||||
logging.debug('Instance character limit is '+ str(max_characters))
|
max_characters = mastodon.instance().configuration.statuses['max_characters']
|
||||||
except Exception:
|
logging.debug('Instance character limit is '+ str(max_characters))
|
||||||
# Default value for Mastodon
|
except Exception:
|
||||||
max_characters = 500
|
# Default value for Mastodon
|
||||||
logging.debug('Tried to get toot character limit from Mastodon instance but failed. Assuming 500')
|
max_characters = 500
|
||||||
|
logging.debug('Tried to get toot character limit from Mastodon instance but failed. Assuming 500')
|
||||||
|
|
||||||
# **********************************************************
|
# **********************************************************
|
||||||
# Iterate tweets in list.
|
# Iterate tweets in list.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user