From nobody Mon Dec 23 13:39:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517474271216544.8385023344287; Thu, 1 Feb 2018 00:37:51 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5401921E0BA09; Thu, 1 Feb 2018 00:31:42 -0800 (PST) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (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 346B321E0BA06 for ; Thu, 1 Feb 2018 00:31:39 -0800 (PST) Received: from localhost.localdomain (unknown.telstraglobal.net [134.159.103.118]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Thu, 01 Feb 2018 09:37:13 +0100 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=195.135.221.5; helo=smtp.nue.novell.com; envelope-from=glin@suse.com; receiver=edk2-devel@lists.01.org From: Gary Lin To: edk2-devel@lists.01.org Date: Thu, 1 Feb 2018 16:36:06 +0800 Message-Id: <20180201083608.16036-19-glin@suse.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180201083608.16036-1-glin@suse.com> References: <20180201083608.16036-1-glin@suse.com> Subject: [edk2] [PATCH v2 18/20] BaseTools: Move OverrideAttribs to OptRomInfStatement.py X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom =3D> GenFds.OptRomInfStatement =3D> GenFds.OptionRom Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/GenFds/FdfParser.py | 2 +- BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 18 ++++++++++++++++= -- BaseTools/Source/Python/GenFds/OptionRom.py | 14 -------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index 4e07d04c08df..52e4727e38a6 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -4481,7 +4481,7 @@ class FdfParser: # def __GetOptRomOverrides(self, Obj): if self.__IsToken('{'): - Overrides =3D OptionRom.OverrideAttribs() + Overrides =3D OptRomInfStatement.OverrideAttribs() while True: if self.__IsKeyword( "PCI_VENDOR_ID"): if not self.__IsToken( "=3D"): diff --git a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py b/BaseToo= ls/Source/Python/GenFds/OptRomInfStatement.py index 5de0cac2a374..a12230fe21ee 100644 --- a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py +++ b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py @@ -45,9 +45,8 @@ class OptRomInfStatement (FfsInfStatement): # @param self The object pointer # def __GetOptRomParams(self): - from . import OptionRom if self.OverrideAttribs =3D=3D None: - self.OverrideAttribs =3D OptionRom.OverrideAttribs() + self.OverrideAttribs =3D OverrideAttribs() =20 if self.OverrideAttribs.NeedCompress =3D=3D None: self.OverrideAttribs.NeedCompress =3D self.OptRomDefs.get ('PC= I_COMPRESS') @@ -151,3 +150,18 @@ class OptRomInfStatement (FfsInfStatement): OutputFileList.extend(FileList) =20 =20 return OutputFileList + +##=20 +# +# +class OverrideAttribs: + ## The constructor + # + # @param self The object pointer + # + def __init__(self): + self.PciVendorId =3D None + self.PciClassCode =3D None + self.PciDeviceId =3D None + self.PciRevision =3D None + self.NeedCompress =3D None diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source= /Python/GenFds/OptionRom.py index a7a63e80845c..01846eb01440 100644 --- a/BaseTools/Source/Python/GenFds/OptionRom.py +++ b/BaseTools/Source/Python/GenFds/OptionRom.py @@ -123,17 +123,3 @@ class OPTIONROM (OptionRomClassObject): GenFdsGlobalVariable.SharpCounter =3D 0 =20 return OutputFile - -class OverrideAttribs: - =20 - ## The constructor - # - # @param self The object pointer - # - def __init__(self): - =20 - self.PciVendorId =3D None - self.PciClassCode =3D None - self.PciDeviceId =3D None - self.PciRevision =3D None - self.NeedCompress =3D None --=20 2.16.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel