-Fix: compare against six.string_types.
six.text_type can throw errors if the result is an empty string in python 2.7, where six.string_types will correctly detect it.
This commit is contained in:
@@ -108,7 +108,7 @@ class CompressorMixin(object):
|
||||
rendered_output = self.render_output(compressor, mode, forced=forced)
|
||||
if cache_key:
|
||||
cache_set(cache_key, rendered_output)
|
||||
assert isinstance(rendered_output, six.text_type)
|
||||
assert isinstance(rendered_output, six.string_types)
|
||||
return rendered_output
|
||||
except Exception:
|
||||
if settings.DEBUG or forced:
|
||||
|
||||
Reference in New Issue
Block a user