diff options
author | Stefan Herbrechtsmeier | 2022-08-19 16:25:19 +0200 |
---|---|---|
committer | Simon Glass | 2022-08-20 18:07:32 -0600 |
commit | facc378a869ebe2ee614f6ff9d18ab95fa37fe53 (patch) | |
tree | 172ad75831ff2f553558d667f3178f65bba3249e /tools/binman | |
parent | 6ac7a83e4da8772bfc7d9cb56cf20b1aaa2b08ab (diff) |
binman: Avoid duplicates in bintool lists
Avoid duplicate entries in the list of bintools used by the image and
the list of missing bintools.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman')
-rw-r--r-- | tools/binman/entry.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index d413c91f181..1795d5cf300 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -1081,7 +1081,8 @@ features to produce new behaviours. Args: bintool (Bintool): Bintool that was missing """ - self.missing_bintools.append(bintool) + if bintool not in self.missing_bintools: + self.missing_bintools.append(bintool) def check_missing_bintools(self, missing_list): """Check if any entries in this section have missing bintools @@ -1091,7 +1092,10 @@ features to produce new behaviours. Args: missing_list: List of Bintool objects to be added to """ - missing_list += self.missing_bintools + for bintool in self.missing_bintools: + if bintool not in missing_list: + missing_list.append(bintool) + def GetHelpTags(self): """Get the tags use for missing-blob help |