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