Add custom exception

This commit is contained in:
alex martin shepherd 2023-03-03 12:47:43 +01:00 committed by GitHub
parent 92a7cbac35
commit 2905c07863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -341,7 +341,10 @@ class Mastodon(Internals):
# Determine users to mention # Determine users to mention
mentioned_accounts = collections.OrderedDict() mentioned_accounts = collections.OrderedDict()
try:
mentioned_accounts[to_status.account.id] = to_status.account.acct mentioned_accounts[to_status.account.id] = to_status.account.acct
except AttributeError as e:
raise TypeError("to_status must specify a status dict!") from e
if not untag: if not untag:
for account in to_status.mentions: for account in to_status.mentions: