summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-06 00:33:07 -0800
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-11-06 09:33:07 +0100
commitfbbff7f80870bc3e98de4a2fc9cd853949842fd0 (patch)
tree1bfdfcf3819aea82a8a3704ea9d5187f22edf7c3 /django/core
parent422b875c6586a6548c6bf34a0851ae82198a8818 (diff)
Refs #29983 -- Added pathlib.Path support to the file email backend.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/mail/backends/filebased.py3
1 files changed, 0 insertions, 3 deletions
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)