summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Xml
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/UPT/Xml')
-rw-r--r--BaseTools/Source/Python/UPT/Xml/IniToXml.py2
-rw-r--r--BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/UPT/Xml/IniToXml.py b/BaseTools/Source/Python/UPT/Xml/IniToXml.py
index 8125f183be..70d8fb19f2 100644
--- a/BaseTools/Source/Python/UPT/Xml/IniToXml.py
+++ b/BaseTools/Source/Python/UPT/Xml/IniToXml.py
@@ -326,7 +326,7 @@ def IniToXml(IniFile):
CurrentKey = ''
PreMap = None
Map = None
- FileContent = ConvertSpecialChar(open(IniFile, 'r').readlines())
+ FileContent = ConvertSpecialChar(open(IniFile, 'rb').readlines())
LastIndex = 0
for Index in range(0, len(FileContent)):
LastIndex = Index
diff --git a/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py b/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
index bf64d89f17..d170761aad 100644
--- a/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
+++ b/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
@@ -53,7 +53,7 @@ def ConvertVariableName(VariableName):
if SecondByte != 0:
return None
- if FirstByte not in range(0x20, 0x7F):
+ if FirstByte not in xrange(0x20, 0x7F):
return None
TransferedStr += ('%c')%FirstByte
Index = Index + 2