flame: fix wiretap with umask

This commit is contained in:
Jakub Jezek 2022-04-07 14:27:00 +02:00
parent c2a4176067
commit 614c49b57f
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -185,7 +185,9 @@ class WireTapCom(object):
exit_code = subprocess.call(
project_create_cmd,
cwd=os.path.expanduser('~'))
cwd=os.path.expanduser('~'),
preexec_fn=_subprocess_preexec_fn
)
if exit_code != 0:
RuntimeError("Cannot create project in flame db")
@ -448,7 +450,9 @@ class WireTapCom(object):
exit_code = subprocess.call(
project_colorspace_cmd,
cwd=os.path.expanduser('~'))
cwd=os.path.expanduser('~'),
preexec_fn=_subprocess_preexec_fn
)
if exit_code != 0:
RuntimeError("Cannot set colorspace {} on project {}".format(
@ -456,6 +460,11 @@ class WireTapCom(object):
))
def _subprocess_preexec_fn():
os.setpgrp()
os.umask(0o022)
if __name__ == "__main__":
# get json exchange data
json_path = sys.argv[-1]