MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ExceptionCheck

Class ExceptionCheck

BaseTools/Source/Python/Ecc/Exception.py:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58# A class to check exception
59class ExceptionCheck(object):
60 def __init__(self, FilePath = None):
61 self.ExceptionList = []
62 self.ExceptionListXml = ExceptionListXml()
63 self.LoadExceptionListXml(FilePath)
64
65 def LoadExceptionListXml(self, FilePath):
66 if FilePath and os.path.isfile(FilePath):
67 self.ExceptionListXml.FromXmlFile(FilePath)
68 self.ExceptionList = self.ExceptionListXml.ToList()
69
70 def IsException(self, ErrorID, KeyWord, FileID=-1):
71 if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:
72 return True
73 else:
74 return False
75
76##
77#

Callers 2

Exception.pyFile · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected