X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FEcc%2FException.py;h=bde41c3a4b570931d9b2cc2336b483d1800c5b75;hp=733408551af19876cf8b9eafad6986475c911e18;hb=92beb1e4c73a40a708c7c0cade5c7cee314b3887;hpb=30fdf1140b8d1ce93f3821d986fa165552023440 diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py index 733408551a..bde41c3a4b 100644 --- a/BaseTools/Source/Python/Ecc/Exception.py +++ b/BaseTools/Source/Python/Ecc/Exception.py @@ -1,8 +1,8 @@ ## @file # This file is used to parse exception items found by ECC tool # -# Copyright (c) 2009, Intel Corporation -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -14,8 +14,9 @@ ## # Import Modules # -from Common.XmlRoutines import * -import os.path +from __future__ import print_function +from Xml.XmlRoutines import * +import Common.LongFilePathOs as os # ExceptionXml to parse Exception Node of XML file class ExceptionXml(object): @@ -72,7 +73,7 @@ class ExceptionCheck(object): self.ExceptionList = self.ExceptionListXml.ToList() def IsException(self, ErrorID, KeyWord, FileID=-1): - if (str(ErrorID), KeyWord) in self.ExceptionList: + if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList: return True else: return False @@ -84,4 +85,4 @@ class ExceptionCheck(object): # if __name__ == '__main__': El = ExceptionCheck('C:\\Hess\\Project\\BuildTool\\src\\Ecc\\exception.xml') - print El.ExceptionList + print(El.ExceptionList)