[PATCH 2/8] binman: Clarify use of False when obtaining data
Simon Glass
sjg at chromium.org
Thu Jan 12 00:10:13 CET 2023
This means that the data is not yet available. Update some comments to
make this clearer.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/binman/entry.py | 3 ++-
tools/binman/etype/section.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index d73f3013405..f99618d4532 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -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
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 44dafaf7262..85474f2411e 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -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
--
2.39.0.314.g84b9a713c41-goog
More information about the U-Boot
mailing list