Skip to content

Commit

Permalink
mnt: address lint
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Dec 16, 2023
1 parent ad69fca commit a46d877
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/iembot/iemchatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def processMessagePC(self, elem):
for user_id in self.md_routingtable.get(channel, []):
if user_id not in self.md_users:
log.msg(
f"Failed to send to Mastodon due to no access_tokens {user_id}"
"Failed to send to Mastodon due to no "
f"access_tokens {user_id}"
)
continue
# Require the x.twitter attribute to be set to prevent
Expand Down
5 changes: 3 additions & 2 deletions src/iembot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def toot(bot, user_id, twttxt, **kwargs):
api_base_url=bot.md_users[user_id]["api_base_url"],
)
log.msg(
f"Sending to Mastodon {bot.md_users[user_id]['screen_name']}({user_id}) "
"Sending to Mastodon "
f"{bot.md_users[user_id]['screen_name']}({user_id}) "
f"'{twttxt}' media:{kwargs.get('twitter_media')}"
)
media = kwargs.get("twitter_media")
Expand All @@ -142,7 +143,7 @@ def toot(bot, user_id, twttxt, **kwargs):
time.sleep(kwargs.get("sleep", 10))
res = api.status_post(**params)
except mastodon.errors.MastodonError as exp:
# Something else bad happened when submitting this to the Mastodon server
# Something else bad happened when submitting this to the Mastodon
log.err(exp)
params.pop("media_ids", None) # Try again without media
# Since this called from a thread, sleeping should not jam us up
Expand Down

0 comments on commit a46d877

Please sign in to comment.