diff options
author | Simon Glass | 2020-11-08 20:36:19 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-13 07:58:17 -0700 |
commit | 6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a (patch) | |
tree | 11ef9a187ed15da8fe6904ba62a7aaf53b03b814 /tools/patman/tools.py | |
parent | fc0056e8d5ab62adc17455c99864d9a974633a46 (diff) |
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/tools.py')
-rw-r--r-- | tools/patman/tools.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py index 55ba1e9c985..7cd58031e78 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 |