[PATCH] buildman: Ignore blank lines during size checks

Tom Rini trini at konsulko.com
Fri Dec 6 21:31:31 CET 2019


Today when parsing the .sizes files we get a warning about an invalid
line in the file as it's blank.  Solve this by checking that we have a
non-blank line prior to processing.

Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 tools/buildman/builder.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index cfbe4c26b1a9..784c64122ba6 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -577,7 +577,8 @@ class Builder:
         sym = {}
         for line in fd.readlines():
             try:
-                size, type, name = line[:-1].split()
+                if line.strip():
+                    size, type, name = line[:-1].split()
             except:
                 Print("Invalid line in file '%s': '%s'" % (fname, line[:-1]))
                 continue
-- 
2.17.1



More information about the U-Boot mailing list