summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-09 06:36:19 +0300
committerSimon Glass <sjg@chromium.org>2020-12-13 17:58:17 +0300
commit6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a (patch)
tree11ef9a187ed15da8fe6904ba62a7aaf53b03b814 /tools/patman
parentfc0056e8d5ab62adc17455c99864d9a974633a46 (diff)
downloadu-boot-6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a.tar.xz
patman: Drop tools.ToByte()
This is not needed in Python 3. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/tools.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index 55ba1e9c98..7cd58031e7 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -423,21 +423,6 @@ def GetBytes(byte, size):
"""
return bytes([byte]) * size
-def ToByte(ch):
- """Convert a character to an ASCII value
-
- This is useful because in Python 2 bytes is an alias for str, but in
- Python 3 they are separate types. This function converts the argument to
- an ASCII value in either case.
-
- Args:
- ch: A string (Python 2) or byte (Python 3) value
-
- Returns:
- integer ASCII value for ch
- """
- return ord(ch) if type(ch) == str else ch
-
def ToChar(byte):
"""Convert a byte to a character