bitbake/build.py: Remove zero sized log files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
bec200b38d
commit
d326382b5f
|
@ -184,6 +184,10 @@ def exec_func(func, d, dirs = None):
|
|||
so.close()
|
||||
se.close()
|
||||
|
||||
if os.path.getsize(logfile) == 0:
|
||||
bb.msg.debug(2, bb.msg.domain.Build, "Zero size logfile %s, removing" % logfile)
|
||||
os.remove(logfile)
|
||||
|
||||
# Close the backup fds
|
||||
os.close(osi[0])
|
||||
os.close(oso[0])
|
||||
|
|
|
@ -225,6 +225,10 @@ def exec_func_shell(func, d, flags):
|
|||
so.close()
|
||||
se.close()
|
||||
|
||||
if os.path.getsize(logfile) == 0:
|
||||
bb.msg.debug(2, bb.msg.domain.Build, "Zero size logfile %s, removing" % logfile)
|
||||
os.remove(logfile)
|
||||
|
||||
# close the backup fds
|
||||
os.close(osi[0])
|
||||
os.close(oso[0])
|
||||
|
|
Loading…
Reference in New Issue