From f7496d717357b9af78414d19679b073403812340 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Thu, 5 Jul 2018 17:40:04 +0800 Subject: BaseTools: Clean up source files 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Ecc/Exception.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'BaseTools/Source/Python/Ecc/Exception.py') diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py index bde41c3a4b..0498a503d7 100644 --- a/BaseTools/Source/Python/Ecc/Exception.py +++ b/BaseTools/Source/Python/Ecc/Exception.py @@ -1,7 +1,7 @@ ## @file # This file is used to parse exception items found by ECC tool # -# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, 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 @@ -24,12 +24,12 @@ class ExceptionXml(object): self.KeyWord = '' self.ErrorID = '' self.FilePath = '' - + def FromXml(self, Item, Key): self.KeyWord = XmlElement(Item, '%s/KeyWord' % Key) self.ErrorID = XmlElement(Item, '%s/ErrorID' % Key) self.FilePath = os.path.normpath(XmlElement(Item, '%s/FilePath' % Key)) - + def __str__(self): return 'ErrorID = %s KeyWord = %s FilePath = %s' %(self.ErrorID, self.KeyWord, self.FilePath) @@ -37,22 +37,22 @@ class ExceptionXml(object): class ExceptionListXml(object): def __init__(self): self.List = [] - + def FromXmlFile(self, FilePath): XmlContent = XmlParseFile(FilePath) for Item in XmlList(XmlContent, '/ExceptionList/Exception'): Exp = ExceptionXml() Exp.FromXml(Item, 'Exception') self.List.append(Exp) - + def ToList(self): RtnList = [] for Item in self.List: #RtnList.append((Item.ErrorID, Item.KeyWord, Item.FilePath)) RtnList.append((Item.ErrorID, Item.KeyWord)) - + return RtnList - + def __str__(self): RtnStr = '' if self.List: @@ -71,7 +71,7 @@ class ExceptionCheck(object): if FilePath and os.path.isfile(FilePath): self.ExceptionListXml.FromXmlFile(FilePath) self.ExceptionList = self.ExceptionListXml.ToList() - + def IsException(self, ErrorID, KeyWord, FileID=-1): if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList: return True -- cgit v1.2.3