Commit cd0568fb by Steven Cummings

Provide attempted command on IOError from pipe

parent 935094ee
...@@ -232,7 +232,11 @@ class SubProcessCompressor(CompressorBase): ...@@ -232,7 +232,11 @@ class SubProcessCompressor(CompressorBase):
def execute_command(self, command, content): def execute_command(self, command, content):
pipe = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, pipe = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE) stdin=subprocess.PIPE, stderr=subprocess.PIPE)
pipe.stdin.write(smart_str(content)) try:
pipe.stdin.write(smart_str(content))
except IOError:
error = "Unable to pipe content to command: %s" % command
raise CompressorError(error)
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