From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DA229211158EE for ; Tue, 4 Sep 2018 20:27:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2018 20:27:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,331,1531810800"; d="scan'208";a="89041331" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga002.jf.intel.com with ESMTP; 04 Sep 2018 20:27:34 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Hess Chen , Liming Gao Date: Wed, 5 Sep 2018 11:27:29 +0800 Message-Id: <1536118049-20696-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Fix the RaiseError variable issue caused by 855698fb69f X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2018 03:27:39 -0000 The bug is that it cause the RaiseError always be set to TRUE even we call the function with FALSE parameter. Cc: Hess Chen Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Common/EdkLogger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/EdkLogger.py b/BaseTools/Source/Python/Common/EdkLogger.py index 80697bf..af77074 100644 --- a/BaseTools/Source/Python/Common/EdkLogger.py +++ b/BaseTools/Source/Python/Common/EdkLogger.py @@ -196,12 +196,12 @@ def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=Non LogText = _ErrorMessageTemplate % TemplateDict else: 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 quiet = _ErrorLogger.error -- 2.6.1.windows.1