summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/StrGather.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/StrGather.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/StrGather.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index 3f384db1df..05e670ac06 100644
--- a/BaseTools/Source/Python/AutoGen/StrGather.py
+++ b/BaseTools/Source/Python/AutoGen/StrGather.py
@@ -122,6 +122,8 @@ def DecToHexList(Dec, Digit = 8):
# @retval: A list for formatted hex string
#
def AscToHexList(Ascii):
+ if isinstance(Ascii, bytes):
+ return ['0x{0:02X}'.format(Item) for Item in Ascii]
return ['0x{0:02X}'.format(ord(Item)) for Item in Ascii]
## Create content of .h file