Commit f61090bc authored by Godefroid Chapelle's avatar Godefroid Chapelle

Problem: missing error handling leads to IndexError

Solution: sys.exit when pip install fails
parent 2a57f192
...@@ -1671,8 +1671,9 @@ def call_pip_install(spec, dest): ...@@ -1671,8 +1671,9 @@ def call_pip_install(spec, dest):
logger.error( logger.error(
"An error occurred when trying to install %s. " "An error occurred when trying to install %s. "
"Look above this message for any errors that " "Look above this message for any errors that "
"were output by easy_install.", "were output by pip install.",
spec) spec)
sys.exit(1)
split_entries = [os.path.splitext(entry) for entry in os.listdir(dest)] split_entries = [os.path.splitext(entry) for entry in os.listdir(dest)]
try: try:
...@@ -1681,7 +1682,7 @@ def call_pip_install(spec, dest): ...@@ -1681,7 +1682,7 @@ def call_pip_install(spec, dest):
][0] ][0]
except IndexError: except IndexError:
logger.error( logger.error(
"No .dist-info directory after installing %s", "No .dist-info directory after successful pip install of %s",
spec) spec)
raise raise
......
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