diff options
author | Simon Glass <sjg@chromium.org> | 2019-04-25 21:58:33 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-05-08 12:44:07 +0800 |
commit | 5203258c6e149ab865e337c00437a909abf3b5b4 (patch) | |
tree | 07beb595fc1e22bf20df62cf89dd2c2b7be9c5ed /tools | |
parent | 8d7f06bbbef16f172cd5e9c4923cdcebe16b8980 (diff) | |
download | u-boot-5203258c6e149ab865e337c00437a909abf3b5b4.zip u-boot-5203258c6e149ab865e337c00437a909abf3b5b4.tar.gz u-boot-5203258c6e149ab865e337c00437a909abf3b5b4.tar.bz2 |
binman: Don't generate an error in 'text' entry constructor
It is not good practice to raise an exception in a constructor. In this
case the 'text' entry may not actually be used, if -i is used to filter
out the images that get built.
Move the exception to where the data is actually used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binman/etype/text.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/binman/etype/text.py b/tools/binman/etype/text.py index 6e99819..c4aa510 100644 --- a/tools/binman/etype/text.py +++ b/tools/binman/etype/text.py @@ -51,10 +51,10 @@ class Entry_text(Entry): self.text_label, = self.GetEntryArgsOrProps( [EntryArg('text-label', str)]) self.value, = self.GetEntryArgsOrProps([EntryArg(self.text_label, str)]) + + def ObtainContents(self): if not self.value: self.Raise("No value provided for text label '%s'" % self.text_label) - - def ObtainContents(self): self.SetContents(self.value) return True |