summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-09 06:36:20 +0300
committerSimon Glass <sjg@chromium.org>2020-12-13 17:58:17 +0300
commit479dd30f4ac3a8ef417a9aafed24c0cad8a866be (patch)
tree005d729338886353043d0678e999f32e6f0037e4 /tools/patman
parent6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a (diff)
downloadu-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/patman')
-rw-r--r--tools/patman/tools.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index 7cd58031e7..00c7013924 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -423,29 +423,6 @@ def GetBytes(byte, size):
"""
return bytes([byte]) * size
-def ToChar(byte):
- """Convert a byte to a character
-
- This is useful because in Python 2 bytes is an alias for str, but in
- Python 3 they are separate types. This function converts an ASCII value to
- a value with the appropriate type in either case.
-
- Args:
- byte: A byte or str value
- """
- return chr(byte) if type(byte) != str else byte
-
-def ToChars(byte_list):
- """Convert a list of bytes to a str/bytes type
-
- Args:
- byte_list: List of ASCII values representing the string
-
- Returns:
- string made by concatenating all the ASCII values
- """
- return ''.join([chr(byte) for byte in byte_list])
-
def ToBytes(string):
"""Convert a str type into a bytes type