Commit 159a605a by Fabian Büchler

Avoid CompressionError for newlines in stderr

UglifyJS2 prints two newlines '\n\n' into stderr for me.
The `if stderr` in the `SubProcessCompressor.execute_command` raises a CompressionError if that happens.
I've added a `strip()` call to avoid that.
parent 1871532f
......@@ -232,7 +232,7 @@ class SubProcessCompressor(CompressorBase):
if content:
content = smart_bytes(content)
stdout, stderr = pipe.communicate(content)
if stderr:
if stderr.strip():
raise CompressorError(stderr)
if self.verbose:
print(stderr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment