Skip to content
Snippets Groups Projects
Commit d6538d22 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

tools/genboardscfg.py: wait for unfinished subprocesses before error-out


When an error occurs or the program is terminated by the user
on the way, the destructer __del__ of class Slot is invoked and
the work directories are removed.

We have to make sure there are no subprocesses (in this case,
"make O=<work_dir> ...") using the work directories before
removing them.  Otherwise the subprocess spits a bunch of error
messages possibly causing more problems.  Perhaps some users
may get upset to see too many error messages.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 13246f48
No related branches found
No related tags found
No related merge requests found
...@@ -276,6 +276,9 @@ class Slot: ...@@ -276,6 +276,9 @@ class Slot:
def __del__(self): def __del__(self):
"""Delete the working directory""" """Delete the working directory"""
if not self.occupied:
while self.ps.poll() == None:
pass
shutil.rmtree(self.build_dir) shutil.rmtree(self.build_dir)
def add(self, defconfig): def add(self, defconfig):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment