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.
This commit is contained in:
Sebastiaan Zeeff 2020-02-17 11:37:03 +01:00 committed by Rapptz
parent c11dfbca6d
commit 59ed908ee2

View File

@ -357,7 +357,7 @@ class _PartialWebhookState:
return _FriendlyHttpAttributeErrorHelper() return _FriendlyHttpAttributeErrorHelper()
def __getattr__(self, attr): 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: class Webhook:
"""Represents a Discord webhook. """Represents a Discord webhook.