## @file\r
# This file is for converting package information data file to xml file.\r
#\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
from Logger import StringTable as ST\r
from Library.String import ConvertSpecialChar\r
from Library.ParserValidate import IsValidPath\r
+from Library import GlobalData\r
\r
## log error:\r
#\r
# @param Filename: File to be checked\r
#\r
def ValidateMiscFile(Filename):\r
- Root = ''\r
- if 'WORKSPACE' in os.environ:\r
- Root = os.environ['WORKSPACE']\r
+ Root = GlobalData.gWORKSPACE\r
return __ValidatePath(Filename, Root)\r
\r
## ValidateToolsFile\r
Valid, Cause = False, ''\r
if not Valid and 'EDK_TOOLS_PATH' in os.environ:\r
Valid, Cause = __ValidatePath(Filename, os.environ['EDK_TOOLS_PATH'])\r
- if not Valid and 'WORKSPACE' in os.environ:\r
- Valid, Cause = __ValidatePath(Filename, os.environ['WORKSPACE'])\r
+ if not Valid:\r
+ Valid, Cause = __ValidatePath(Filename, GlobalData.gWORKSPACE)\r
return Valid, Cause\r
\r
## ParseFileList\r
for Index in range(0, len(FileContent)):\r
LastIndex = Index\r
Line = FileContent[Index].strip()\r
- if Line == '':\r
+ if Line == '' or Line.startswith(';'):\r
continue\r
if Line[0] == TAB_SECTION_START and Line[-1] == TAB_SECTION_END:\r
CurrentKey = ''\r