Skip to content

Commit

Permalink
send message about failed venv creation
Browse files Browse the repository at this point in the history
  • Loading branch information
razumau committed Jan 28, 2020
1 parent fd566f8 commit 4540a61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion duro/create/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def run_processor(
processed_filename: str,
):
venv_path = f"./venvs/{table_name}"
subprocess.run(["python", "-m", "venv", venv_path])
venv_creation_result = subprocess.run(["python3", "-m", "venv", venv_path])
if venv_creation_result.returncode != 0:
error_message = f"Couldn’t create venv: {venv_creation_result.stderr}"
raise ProcessorRunError(table_name, error_message)

requirements = find_requirements_txt(views_path, table_name)
if requirements:
subprocess.run([f"{venv_path}/bin/pip", "install", "-r", requirements])
Expand Down

0 comments on commit 4540a61

Please sign in to comment.