Added info message to log

This commit is contained in:
JCF 2023-06-15 20:34:57 +02:00
parent 36298925ac
commit cc0935297f

View File

@ -262,12 +262,11 @@ def update_profile(nitter_url, soup, sql, mast_password):
# Update profile on Mastodon # Update profile on Mastodon
try: try:
mastodon.account_update_credentials(avatar=new_avatar_img, avatar_mime_type=new_avatar_mime, header=new_banner_img, header_mime_type=new_banner_mime) mastodon.account_update_credentials(avatar=new_avatar_img, avatar_mime_type=new_avatar_mime, header=new_banner_img, header_mime_type=new_banner_mime)
logging.debug("Images uploaded")
except Exception as e: except Exception as e:
logging.error("Could not update profile") logging.error("Could not update profile")
logging.error(e) logging.error(e)
else: else:
logging.debug("Profile updated on Mastodon") logging.info("Profile updated on Mastodon")
# Add urls to database # Add urls to database
db.execute("UPDATE profiles SET avatar_url=?, banner_url=? WHERE mastodon_instance=? AND mastodon_account=?", (new_avatar_url, new_banner_url, TOML['config']['mastodon_instance'], TOML['config']['mastodon_user'])) db.execute("UPDATE profiles SET avatar_url=?, banner_url=? WHERE mastodon_instance=? AND mastodon_account=?", (new_avatar_url, new_banner_url, TOML['config']['mastodon_instance'], TOML['config']['mastodon_user']))
sql.commit() sql.commit()