diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-09 06:36:20 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 17:58:17 +0300 |
commit | 479dd30f4ac3a8ef417a9aafed24c0cad8a866be (patch) | |
tree | 005d729338886353043d0678e999f32e6f0037e4 /tools/dtoc/fdt.py | |
parent | 6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a (diff) | |
download | u-boot-479dd30f4ac3a8ef417a9aafed24c0cad8a866be.tar.xz |
patman: Drop tools.ToChar() and ToChars()
This is useful anymore, since we always want to call chr() in Python 3.
Drop it and adjust callers to use chr().
Also drop ToChars() which is no-longer used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r-- | tools/dtoc/fdt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index cb365ca094..4a78c73725 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -87,9 +87,9 @@ def BytesToValue(data): return Type.STRING, [s.decode() for s in strings[:-1]] if size % 4: if size == 1: - return Type.BYTE, tools.ToChar(data[0]) + return Type.BYTE, chr(data[0]) else: - return Type.BYTE, [tools.ToChar(ch) for ch in list(data)] + return Type.BYTE, [chr(ch) for ch in list(data)] val = [] for i in range(0, size, 4): val.append(data[i:i + 4]) @@ -152,9 +152,9 @@ class Prop: if type(self.value) == list: new_value = [] for val in self.value: - new_value += [tools.ToChar(by) for by in val] + new_value += [chr(by) for by in val] else: - new_value = [tools.ToChar(by) for by in self.value] + new_value = [chr(by) for by in self.value] self.value = new_value self.type = newprop.type |