summaryrefslogtreecommitdiff
path: root/django/contrib/staticfiles/storage.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-03-04 15:47:49 +0100
committerClaude Paroz <claude@2xlibre.net>2017-03-04 18:18:21 +0100
commit8346680e1ca4a8ddc8190baf3f5f944f6418d5cf (patch)
treeed12bc1d1077a65c1b32d410bc267266f6e3e4f9 /django/contrib/staticfiles/storage.py
parent86de930f413e0ad902e11d78ac988e6743202ea6 (diff)
Refs #27795 -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
Diffstat (limited to 'django/contrib/staticfiles/storage.py')
-rw-r--r--django/contrib/staticfiles/storage.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py
index ac430df40d..19f33f351f 100644
--- a/django/contrib/staticfiles/storage.py
+++ b/django/contrib/staticfiles/storage.py
@@ -14,7 +14,7 @@ from django.core.cache import (
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage, get_storage_class
-from django.utils.encoding import force_bytes, force_text
+from django.utils.encoding import force_bytes
from django.utils.functional import LazyObject
@@ -308,7 +308,7 @@ class HashedFilesMixin:
self.delete(hashed_name)
saved_name = self._save(hashed_name, content_file)
- hashed_name = force_text(self.clean_name(saved_name))
+ hashed_name = self.clean_name(saved_name)
# If the file hash stayed the same, this file didn't change
if old_hashed_name == hashed_name:
substitutions = False
@@ -320,7 +320,7 @@ class HashedFilesMixin:
if not hashed_file_exists:
processed = True
saved_name = self._save(hashed_name, original_file)
- hashed_name = force_text(self.clean_name(saved_name))
+ hashed_name = self.clean_name(saved_name)
# and then set the cache accordingly
hashed_files[hash_key] = hashed_name