提交 6a343fe4 编写于 作者: D Donald Stufft

Properly raise an error when it happens

上级 3c733ca0
......@@ -48,16 +48,18 @@ class VirtualEnvironment(object):
# Install our development version of pip install the virtual
# environment
cmd = [self.location.join("bin", "python"), "setup.py", "develop"]
p = subprocess.Popen(
[self.location.join("bin", "python"), "setup.py", "develop"],
cmd,
cwd=self.pip_source_dir,
stderr=subprocess.STDOUT,
stdout=DEVNULL,
)
p.communicate()
if p.returncode != 0:
raise subprocess.CalledProcessError(p.returncode, p.args)
raise subprocess.CalledProcessError(p.returncode, cmd[0],
output=p.stdout,
)
def clear(self):
self._create(clear=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册