mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
buildman: Deal more nicely with invalid build-status file
The 'done' files created by buildman may end up being empty if buildman runs out of disk space while writing them. At present buildman dies with an exception when using -s to check the build status. Fix this. Seriesl-cc: trini Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e679d03b08
commit
347ea0b63e
1 changed files with 6 additions and 1 deletions
|
@ -673,7 +673,12 @@ class Builder:
|
|||
environment = {}
|
||||
if os.path.exists(done_file):
|
||||
with open(done_file, 'r') as fd:
|
||||
return_code = int(fd.readline())
|
||||
try:
|
||||
return_code = int(fd.readline())
|
||||
except ValueError:
|
||||
# The file may be empty due to running out of disk space.
|
||||
# Try a rebuild
|
||||
return_code = 1
|
||||
err_lines = []
|
||||
err_file = self.GetErrFile(commit_upto, target)
|
||||
if os.path.exists(err_file):
|
||||
|
|
Loading…
Reference in a new issue