]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Clarify use of False when obtaining data
authorSimon Glass <sjg@chromium.org>
Wed, 11 Jan 2023 23:10:13 +0000 (16:10 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 18 Jan 2023 21:55:40 +0000 (14:55 -0700)
This means that the data is not yet available. Update some comments to
make this clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/entry.py
tools/binman/etype/section.py

index d73f30134052d365b49df914909501f62b3114e6..f99618d4532339a05ad462b30aec7fb53dc40909 100644 (file)
@@ -582,7 +582,8 @@ class Entry(object):
 
         Returns:
             bytes content of the entry, excluding any padding. If the entry is
-                compressed, the compressed data is returned
+                compressed, the compressed data is returned. If the entry data
+                is not yet available, False can be returned
         """
         self.Detail('GetData: size %s' % to_hex_size(self.data))
         return self.data
index 44dafaf7262747eea76bc1e19db2d8b66c695b18..85474f2411e229518e901a3360e4222cc9ce4c68 100644 (file)
@@ -265,6 +265,7 @@ class Entry_section(Entry):
 
         Args:
             entry: Entry to check
+            entry_data: Data for the entry, False if is null
 
         Returns:
             Contents of the entry along with any pad bytes before and
@@ -678,7 +679,7 @@ class Entry_section(Entry):
         """
         def _CheckDone(entry):
             if entry != skip_entry:
-                if not entry.ObtainContents():
+                if entry.ObtainContents() is False:
                     next_todo.append(entry)
             return entry