From 9fc6ebd8feb4654483b544d12587857cf8938796 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 6 Jan 2021 21:35:10 -0700 Subject: dtoc: binman: Drop Python 2 code Drop a few more Python 2 relics that are no-longer needed. Signed-off-by: Simon Glass --- tools/binman/fmap_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/binman/fmap_util.py') diff --git a/tools/binman/fmap_util.py b/tools/binman/fmap_util.py index b03fc28fbb4..8277619768c 100644 --- a/tools/binman/fmap_util.py +++ b/tools/binman/fmap_util.py @@ -53,8 +53,8 @@ FmapArea = collections.namedtuple('FmapArea', FMAP_AREA_NAMES) def NameToFmap(name): - if type(name) == bytes and sys.version_info[0] >= 3: - name = name.decode('utf-8') # pragma: no cover (for Python 2) + if type(name) == bytes: + name = name.decode('utf-8') return name.replace('\0', '').replace('-', '_').upper() def ConvertName(field_names, fields): -- cgit v1.2.3