From 59ed908ee2581e987cc2bf8b4b28d6737f68806e Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> Date: Mon, 17 Feb 2020 11:37:03 +0100 Subject: [PATCH] Fix invalid format specifier in PartialWebhookState.__getattr__ The message for the AttributeError raised by the __getattr__ method of the PartialWebhookState class is formatted using `str.format`. However, the placeholder contained a stray ":" before the !r specifier. This caused a ValueError("Invalid format specifier") to be raised whenever this method was called in lieu of the AttributeError that is intended to be raised. --- discord/webhook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/webhook.py b/discord/webhook.py index ebc8abd99..2fcfd0808 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -357,7 +357,7 @@ class _PartialWebhookState: return _FriendlyHttpAttributeErrorHelper() def __getattr__(self, attr): - raise AttributeError('PartialWebhookState does not support {0:!r}.'.format(attr)) + raise AttributeError('PartialWebhookState does not support {0!r}.'.format(attr)) class Webhook: """Represents a Discord webhook.