Performance hack

This commit is contained in:
Anthony Sottile
2014-03-14 00:30:26 -07:00
parent 1a8095e71e
commit 6b62ec47e8

View File

@@ -1,6 +1,5 @@
from plumbum import local
import subprocess
PY_ENV = 'py_env'
@@ -17,21 +16,9 @@ def install_environment():
def run_hook(hook, file_args):
# TODO: batch filenames
process = subprocess.Popen(
['bash', '-c', ' '.join(
['source {0}/bin/activate &&'.format(PY_ENV)] +
[hook['entry']] + hook.get('args', []) + list(file_args)
)],
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
)
ret = process.communicate()
return (process.returncode,) + ret
return local['bash'][
'-c', ' '.join(
['source {0}/bin/activate &&'.format(PY_ENV)] +
[hook['entry']] + hook.get('args', []) + list(file_args)
)
].run()
].run()