From fbbff7f80870bc3e98de4a2fc9cd853949842fd0 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 6 Nov 2019 00:33:07 -0800 Subject: Refs #29983 -- Added pathlib.Path support to the file email backend. --- django/core/mail/backends/filebased.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'django') diff --git a/django/core/mail/backends/filebased.py b/django/core/mail/backends/filebased.py index b30bb67e92..498d86fba8 100644 --- a/django/core/mail/backends/filebased.py +++ b/django/core/mail/backends/filebased.py @@ -17,9 +17,6 @@ class EmailBackend(ConsoleEmailBackend): self.file_path = file_path else: self.file_path = getattr(settings, 'EMAIL_FILE_PATH', None) - # Make sure self.file_path is a string. - if not isinstance(self.file_path, str): - raise ImproperlyConfigured('Path for saving emails is invalid: %r' % self.file_path) self.file_path = os.path.abspath(self.file_path) try: os.makedirs(self.file_path, exist_ok=True) -- cgit v1.3