diff options
| -rw-r--r-- | django/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/__init__.py b/django/__init__.py index bb650a5..f354dea 100644 --- a/django/__init__.py +++ b/django/__init__.py | |||
| @@ -148,6 +148,8 @@ class CxStorage(S3Storage): | |||
| 148 | import time | 148 | import time |
| 149 | 149 | ||
| 150 | extension = os.path.splitext(name)[1].lower() | 150 | extension = os.path.splitext(name)[1].lower() |
| 151 | # Ensure an ascii string for .hexdigest() later. | ||
| 152 | name = str(name).encode('ascii', 'ignore') | ||
| 151 | 153 | ||
| 152 | return str(md5(str(time.time()) + str(name)).hexdigest()) + \ | 154 | return str(md5(str(time.time()) + name).hexdigest()) + \ |
| 153 | str(extension) | 155 | str(extension) |