summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-14 15:53:39 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:45 -0600
commitd141f6c1cacc754a691507db736a21b8eda2a630 (patch)
tree797a51db4f643fa6ef8fb9f081febd37865055e0
parent35343dc41493666261e37a8a559b78eb2841a528 (diff)
binman: Remove use of Set()
A new built-in set() is used in both Python 2 and 3 now. Move it to use that instead of Set(). Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/binman/bsection.py3
-rw-r--r--tools/binman/entry.py5
-rw-r--r--tools/binman/state.py7
3 files changed, 6 insertions, 9 deletions
diff --git a/tools/binman/bsection.py b/tools/binman/bsection.py
index 0ba542ee98..be67ff957e 100644
--- a/tools/binman/bsection.py
+++ b/tools/binman/bsection.py
@@ -8,7 +8,6 @@
from __future__ import print_function
from collections import OrderedDict
-from sets import Set
import sys
import fdt_util
@@ -109,7 +108,7 @@ class Section(object):
def GetFdtSet(self):
"""Get the set of device tree files used by this image"""
- fdt_set = Set()
+ fdt_set = set()
for entry in self._entries.values():
fdt_set.update(entry.GetFdtSet())
return fdt_set
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 648cfd241f..d842d89dd6 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -18,7 +18,6 @@ except:
have_importlib = False
import os
-from sets import Set
import sys
import fdt_util
@@ -178,8 +177,8 @@ class Entry(object):
# It would be better to use isinstance(self, Entry_blob_dtb) here but
# we cannot access Entry_blob_dtb
if fname and fname.endswith('.dtb'):
- return Set([fname])
- return Set()
+ return set([fname])
+ return set()
def ExpandEntries(self):
pass
diff --git a/tools/binman/state.py b/tools/binman/state.py
index d945e4bf65..af9678649c 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -7,7 +7,6 @@
import hashlib
import re
-from sets import Set
import os
import tools
@@ -24,10 +23,10 @@ entry_args = {}
use_fake_dtb = False
# Set of all device tree files references by images
-fdt_set = Set()
+fdt_set = set()
# Same as above, but excluding the main one
-fdt_subset = Set()
+fdt_subset = set()
# The DTB which contains the full image information
main_dtb = None
@@ -136,7 +135,7 @@ def Prepare(images, dtb):
main_dtb = dtb
fdt_files.clear()
fdt_files['u-boot.dtb'] = dtb
- fdt_subset = Set()
+ fdt_subset = set()
if not use_fake_dtb:
for image in images.values():
fdt_subset.update(image.GetFdtSet())