No longer tries to interpolate an nonexistent string when raising an UncompressableFileError.
This commit is contained in:
@@ -43,7 +43,7 @@ class Compressor(object):
|
|||||||
|
|
||||||
def get_filename(self, url):
|
def get_filename(self, url):
|
||||||
if not url.startswith(settings.MEDIA_URL):
|
if not url.startswith(settings.MEDIA_URL):
|
||||||
raise UncompressableFileError('"%s" is not in COMPRESS_URL ("%s") and can not be compressed' % (url, settings.COMPRESS_URL))
|
raise UncompressableFileError('"%s" is not in COMPRESS_URL ("%s") and can not be compressed' % (url, settings.MEDIA_URL))
|
||||||
basename = url[len(settings.MEDIA_URL):]
|
basename = url[len(settings.MEDIA_URL):]
|
||||||
filename = os.path.join(settings.MEDIA_ROOT, basename)
|
filename = os.path.join(settings.MEDIA_ROOT, basename)
|
||||||
return filename
|
return filename
|
||||||
|
|||||||
Reference in New Issue
Block a user