email_log: Mark EmailLogBackEnd.log_email as a staticmethod.

We don't access the self attribute in this method.
This commit is contained in:
Vishnu KS 2021-01-29 00:47:13 +05:30 committed by Tim Abbott
parent 5870de0fa0
commit 03879eec6d
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ def set_forward_address(forward_address: str) -> None:
config.write(cfgfile)
class EmailLogBackEnd(EmailBackend):
def log_email(self, email: EmailMultiAlternatives) -> None:
@staticmethod
def log_email(email: EmailMultiAlternatives) -> None:
"""Used in development to record sent emails in a nice HTML log"""
html_message = 'Missing HTML message'
if len(email.alternatives) > 0: