Commit 6ecd82c6 authored by Marco Mariani's avatar Marco Mariani

execute recipe: revert 9860b7dc.. with sleep loop (no inotifyx)

parent a4c6ea70
...@@ -6,6 +6,13 @@ import time ...@@ -6,6 +6,13 @@ import time
import inotifyx import inotifyx
def busy_wait_files_creation(file_list):
import os, time
while True:
if all(os.path.exists(f) for f in file_list):
return
time.sleep(2)
def _wait_files_creation(file_list): def _wait_files_creation(file_list):
# Etablish a list of directory and subfiles # Etablish a list of directory and subfiles
directories = dict() directories = dict()
...@@ -80,7 +87,7 @@ def generic_exec(args): ...@@ -80,7 +87,7 @@ def generic_exec(args):
exec_env.update(environment_overriding) exec_env.update(environment_overriding)
if file_list is not None: if file_list is not None:
_wait_files_creation(file_list) busy_wait_files_creation(file_list)
os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env) os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment