mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Compare commits
2 Commits
7ebc2927a7
...
e6af746c17
Author | SHA1 | Date | |
---|---|---|---|
|
e6af746c17 | ||
|
c699e80e25 |
6
twoot.py
6
twoot.py
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user