self._ParserInf()\r
\r
def _ParserInf(self):\r
- Filename = self._FilePath\r
FileLinesList = []\r
UserExtFind = False\r
FindEnd = True\r
SectionData = []\r
\r
try:\r
- FileLinesList = open(Filename, "r", 0).readlines()\r
+ FileLinesList = open(self._FilePath, "r", 0).readlines()\r
except BaseException:\r
- EdkLogger.error("build", AUTOGEN_ERROR, 'File %s is opened failed.' % Filename)\r
+ EdkLogger.error("build", AUTOGEN_ERROR, 'File %s is opened failed.' % self._FilePath)\r
\r
for Index in range(0, len(FileLinesList)):\r
line = str(FileLinesList[Index]).strip()\r
if UserExtFind and FindEnd == False:\r
if line:\r
SectionData.append(line)\r
- if line.lower().startswith(TAB_SECTION_START) and line.lower().endswith(TAB_SECTION_END):\r
+ if line.startswith(TAB_SECTION_START) and line.endswith(TAB_SECTION_END):\r
SectionLine = line\r
UserExtFind = True\r
FindEnd = False\r
UserExtFind = False\r
FindEnd = True\r
self._FileSectionDataList.append({SectionLine: SectionData[:]})\r
- SectionData = []\r
+ del SectionData[:]\r
SectionLine = ''\r
\r
# Get user extension TianoCore data\r