mirror of
https://github.com/django/django.git
synced 2025-12-07 18:26:41 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
parent
f6acd1d271
commit
7b2f2e74ad
213 changed files with 574 additions and 763 deletions
|
|
@ -7,7 +7,6 @@ from django.conf import settings
|
|||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.mail.backends.console import \
|
||||
EmailBackend as ConsoleEmailBackend
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class EmailBackend(ConsoleEmailBackend):
|
||||
|
|
@ -18,7 +17,7 @@ class EmailBackend(ConsoleEmailBackend):
|
|||
else:
|
||||
self.file_path = getattr(settings, 'EMAIL_FILE_PATH', None)
|
||||
# Make sure self.file_path is a string.
|
||||
if not isinstance(self.file_path, six.string_types):
|
||||
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)
|
||||
# Make sure that self.file_path is an directory if it exists.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue