[modules/vault] Update to new API

This commit is contained in:
tobi-wan-kenobi 2020-04-11 13:35:12 +02:00
parent 464a165c8b
commit 4b402438cc
2 changed files with 40 additions and 38 deletions

View file

@ -3,11 +3,11 @@ import shlex
import subprocess
import logging
def execute(cmd, wait=True, ignore_errors=False):
def execute(cmd, wait=True, ignore_errors=False, env=None):
args = shlex.split(cmd)
logging.debug(cmd)
try:
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
except FileNotFoundError as e:
raise RuntimeError('{} not found'.format(cmd))