diff --git a/BaseTools/Source/Python/Common/EdkLogger.py b/BaseTools/Source/Python/Common/EdkLogger.py index 80697bf09b..af7707482c 100644 --- a/BaseTools/Source/Python/Common/EdkLogger.py +++ b/BaseTools/Source/Python/Common/EdkLogger.py @@ -198,8 +198,8 @@ def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=Non LogText = _ErrorMessageTemplateWithoutFile % TemplateDict _ErrorLogger.log(ERROR, LogText) - RaiseError = IsRaiseError - if RaiseError: + + if RaiseError and IsRaiseError: raise FatalError(ErrorCode) # Log information which should be always put out