summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-11 16:10:13 -0700
committerSimon Glass <sjg@chromium.org>2023-01-18 14:55:40 -0700
commit4331d66661566cd823086204636754f785bd5d45 (patch)
tree5b403137f41742bf151e8e48591585e698480430 /tools
parent0b079fcb09c5178ea3de62c7983cb03eea62b4e2 (diff)
downloadu-boot-4331d66661566cd823086204636754f785bd5d45.tar.gz
u-boot-4331d66661566cd823086204636754f785bd5d45.tar.bz2
u-boot-4331d66661566cd823086204636754f785bd5d45.zip
binman: Clarify use of False when obtaining data
This means that the data is not yet available. Update some comments to make this clearer. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/entry.py3
-rw-r--r--tools/binman/etype/section.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index d73f301340..f99618d453 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 44dafaf726..85474f2411 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