summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/StringUtils.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/Common/StringUtils.py b/BaseTools/Source/Python/Common/StringUtils.py
index da2949dbad..d5afde7a95 100644
--- a/BaseTools/Source/Python/Common/StringUtils.py
+++ b/BaseTools/Source/Python/Common/StringUtils.py
@@ -835,12 +835,7 @@ def StringToArray(String):
else:
return "{%s,0x00,0x00}" % ",".join("0x%02x" % ord(C) for C in String[1:-1])
elif String.startswith('{'):
- StringLen = len(String.split(","))
- if StringLen % 2:
- return "{%s,0x00}" % ",".join(C.strip() for C in String[1:-1].split(','))
- else:
- return "{%s}" % ",".join(C.strip() for C in String[1:-1].split(','))
-
+ return "{%s}" % ",".join(C.strip() for C in String[1:-1].split(','))
else:
if len(String.split()) % 2:
return '{%s,0}' % ','.join(String.split())