script audiogen respects TMPDIR
This commit is contained in:
parent
162dac71b0
commit
4b34670557
1 changed files with 9 additions and 5 deletions
|
@ -49,12 +49,16 @@ def generate(spec):
|
||||||
os.getuid()))
|
os.getuid()))
|
||||||
try:
|
try:
|
||||||
log.info('Going to run {}'.format([scriptpath] + args))
|
log.info('Going to run {}'.format([scriptpath] + args))
|
||||||
out = subprocess.check_output([scriptpath] + args,
|
|
||||||
env = dict(
|
env = dict(
|
||||||
HOME=os.environ['HOME'],
|
HOME=os.environ['HOME'],
|
||||||
PATH=os.environ['PATH'],
|
PATH=os.environ['PATH'],
|
||||||
MPD_HOST=conf['MPD_HOST'],
|
MPD_HOST=conf['MPD_HOST'],
|
||||||
MPD_PORT=str(conf['MPD_PORT'])),
|
MPD_PORT=str(conf['MPD_PORT'])
|
||||||
|
)
|
||||||
|
if 'TMPDIR' in os.environ:
|
||||||
|
env['TMPDIR'] = os.environ['TMPDIR']
|
||||||
|
out = subprocess.check_output([scriptpath] + args,
|
||||||
|
env=env,
|
||||||
cwd='/')
|
cwd='/')
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
log.error("Error %d when running script %s" %
|
log.error("Error %d when running script %s" %
|
||||||
|
|
Loading…
Reference in a new issue