]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Ignore blank lines during size checks
authorTom Rini <trini@konsulko.com>
Fri, 6 Dec 2019 20:31:31 +0000 (15:31 -0500)
committerSimon Glass <sjg@chromium.org>
Wed, 11 Dec 2019 04:11:31 +0000 (21:11 -0700)
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@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/buildman/builder.py

index cfbe4c26b1a99b4ebce4ded5c8fab2df00921854..784c64122ba67285f2552926527126b52ae6b1b8 100644 (file)
@@ -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