Minor updates to the conditions.
This commit is contained in:
@@ -18,6 +18,7 @@ class Compressor(object):
|
||||
self.output_prefix = output_prefix
|
||||
self.split_content = []
|
||||
self._parser = None
|
||||
self.charset = settings.DEFAULT_CHARSET
|
||||
|
||||
def split_contents(self):
|
||||
raise NotImplementedError('split_contents must be defined in a subclass')
|
||||
|
@@ -11,7 +11,7 @@ class YUICompressorFilter(FilterBase):
|
||||
arguments = ''
|
||||
if self.type == 'js':
|
||||
arguments = settings.COMPRESS_YUI_JS_ARGUMENTS
|
||||
if self.type == 'css':
|
||||
elif self.type == 'css':
|
||||
arguments = settings.COMPRESS_YUI_CSS_ARGUMENTS
|
||||
|
||||
command = '%s --type=%s %s' % (settings.COMPRESS_YUI_BINARY, self.type, arguments)
|
||||
|
@@ -48,7 +48,7 @@ class CompressorNode(template.Node):
|
||||
return content
|
||||
if self.kind == 'css':
|
||||
compressor = CssCompressor(content)
|
||||
if self.kind == 'js':
|
||||
elif self.kind == 'js':
|
||||
compressor = JsCompressor(content)
|
||||
cachekey = "%s.%s" % (compressor.cachekey, self.mode)
|
||||
output = self.cache_get(cachekey)
|
||||
@@ -56,8 +56,10 @@ class CompressorNode(template.Node):
|
||||
try:
|
||||
if self.mode == OUTPUT_FILE:
|
||||
output = compressor.output()
|
||||
else:
|
||||
elif self.mode == OUTPUT_INLINE:
|
||||
output = compressor.output_inline()
|
||||
else:
|
||||
output = content
|
||||
self.cache_set(cachekey, output)
|
||||
except:
|
||||
from traceback import format_exc
|
||||
|
Reference in New Issue
Block a user