From 80e9c6bac799d957127aa30f82716aa5ef2e2abb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 28 Feb 2018 12:07:19 +0100 Subject: [PATCH] Improve fabfile --- fabfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index 3aa55f3cb..05817e8f2 100644 --- a/fabfile.py +++ b/fabfile.py @@ -14,15 +14,14 @@ VENV_DIR = Path(PWD) / ENV @contextlib.contextmanager -def virtualenv(name, create=False, python='/usr/bin/python3.6', capture=False): +def virtualenv(name, create=False, python='/usr/bin/python3.6'): python = Path(python).resolve() env_path = VENV_DIR if create: if env_path.exists(): shutil.rmtree(str(env_path)) - local('{python} -m venv {env_path}'.format(python=python, env_path=VENV_DIR), - capture=capture) - def wrapped_local(cmd, env_vars=[]): + local('{python} -m venv {env_path}'.format(python=python, env_path=VENV_DIR)) + def wrapped_local(cmd, env_vars=[], capture=False): env_py = env_path / 'bin' / 'python' env_vars = ' '.join(env_vars) if cmd.split()[0] == 'python':