Commit 06844897 by Steven Cummings

On compressor broken pipe, keep original exception when re-raising with new type

parent cd0568fb
......@@ -234,9 +234,9 @@ class SubProcessCompressor(CompressorBase):
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
try:
pipe.stdin.write(smart_str(content))
except IOError:
error = "Unable to pipe content to command: %s" % command
raise CompressorError(error)
except IOError, e:
message = "Unable to pipe content to command: %s" % command
raise CompressorError(message, e)
pipe.stdin.close()
compressed_content = pipe.stdout.read()
......
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