-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:
Xaroth Brook
2014-01-24 23:48:51 +01:00
parent a0f045f89c
commit 9d3d0ccdeb

View File

@@ -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: