From nobody Sun May 5 14:38: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 152228175696788.27377215032448; Wed, 28 Mar 2018 17:02:36 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CBE60224DD141; Wed, 28 Mar 2018 16:55:47 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 56BF5224DD131 for ; Wed, 28 Mar 2018 16:55:44 -0700 (PDT) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 17:02:22 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 17:02:22 -0700 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=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,374,1517904000"; d="scan'208";a="28916589" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 17:02:17 -0700 Message-Id: <7ccb2126413f14091a86381bcdecc8b1938c5b68.1522281624.git.jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 1/4] BaseTools: no need to do int() API work for it X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 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" int() with base=3D0 will already auto determine base from preceeding 0x/0X Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/AutoGen/GenC.py | 5 +---- BaseTools/Source/Python/Common/Expression.py | 4 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 5 +---- BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py | 10 ++-------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Pyt= hon/AutoGen/GenC.py index 481c4dda1447..211b27e6997c 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1032,10 +1032,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pc= d): try: if Value.upper().endswith('L'): Value =3D Value[:-1] - if Value.upper().startswith('0X'): - ValueNumber =3D int (Value, 16) - else: - ValueNumber =3D int (Value) + ValueNumber =3D int (Value, 0) except: EdkLogger.error("build", AUTOGEN_ERROR, "PCD value is not valid dec or hex number = for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName= , TokenCName), diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index 4f0f377f3788..4a3dea1190b2 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -845,7 +845,7 @@ class ValueExpressionEx(ValueExpression): =20 if ItemSize =3D=3D 0: try: - tmpValue =3D int(Item, 16) if Item.upper()= .startswith('0X') else int(Item, 0) + tmpValue =3D int(Item, 0) if tmpValue > 255: raise BadExpression("Byte array numbe= r %s should less than 0xFF." % Item) except BadExpression, Value: @@ -857,7 +857,7 @@ class ValueExpressionEx(ValueExpression): ItemValue =3D ParseFieldValue(Item)[0] =20 if type(ItemValue) =3D=3D type(''): - ItemValue =3D int(ItemValue, 16) if ItemValue.= startswith('0x') else int(ItemValue) + ItemValue =3D int(ItemValue, 0) =20 TmpValue =3D (ItemValue << (Size * 8)) | TmpValue Size =3D Size + ItemSize diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index e35057931f03..bf78baac2185 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1145,10 +1145,7 @@ class FdfParser: if Scope in ['UINT64', 'UINT8']: ValueNumber =3D 0 try: - if Value.upper().startswith('0X'): - ValueNumber =3D int (Value, 16) - else: - ValueNumber =3D int (Value) + ValueNumber =3D int (Value, 0) except: EdkLogger.error("FdfParser", FORMAT_INVALID, "The value is= not valid dec or hex number for %s." % Name) if ValueNumber < 0: diff --git a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py b/BaseT= ools/Source/Python/PatchPcdValue/PatchPcdValue.py index 942ba88d200f..3db480d0cdc6 100644 --- a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py +++ b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py @@ -110,10 +110,7 @@ def PatchBinaryFile(FileName, ValueOffset, TypeName, V= alueString, MaxSize=3D0): ValueNumber =3D 1 elif ValueString =3D=3D 'FALSE': ValueNumber =3D 0 - elif ValueString.startswith('0X'): - ValueNumber =3D int (ValueString, 16) - else: - ValueNumber =3D int (ValueString) + ValueNumber =3D int (ValueString, 0) if ValueNumber !=3D 0: ValueNumber =3D 1 except: @@ -127,10 +124,7 @@ def PatchBinaryFile(FileName, ValueOffset, TypeName, V= alueString, MaxSize=3D0): # Get PCD value for UINT* data type # try: - if ValueString.startswith('0X'): - ValueNumber =3D int (ValueString, 16) - else: - ValueNumber =3D int (ValueString) + ValueNumber =3D int (ValueString, 0) except: return PARAMETER_INVALID, "PCD Value %s is not valid dec or he= x string." % (ValueString) # --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 14:38: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 1522281748557784.9179070230397; Wed, 28 Mar 2018 17:02:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 96917224DD137; Wed, 28 Mar 2018 16:55:46 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 14D8C21F85E89 for ; Wed, 28 Mar 2018 16:55:44 -0700 (PDT) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 17:02:22 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 17:02:22 -0700 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=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,374,1517904000"; d="scan'208";a="28916591" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 17:02:18 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 2/4] BaseTools: use in to compare single chars X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 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" instead if 3 Startswith for single chars, just use in with a list of chars Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index 4a3dea1190b2..51f83ad4c7a4 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -835,7 +835,7 @@ class ValueExpressionEx(ValueExpression): elif Item.startswith('UINT64'): ItemSize =3D 8 ValueType =3D 'UINT64' - elif Item.startswith('"') or Item.startswith("'") = or Item.startswith('L'): + elif Item[0] in ['"',"'",'L']: ItemSize =3D 0 ValueType =3D 'VOID*' else: --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 14:38: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 1522281751493180.70261289440282; Wed, 28 Mar 2018 17:02:31 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 05F35224DD13A; Wed, 28 Mar 2018 16:55:47 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 24477224DD129 for ; Wed, 28 Mar 2018 16:55:44 -0700 (PDT) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 17:02:22 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 17:02:22 -0700 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=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,374,1517904000"; d="scan'208";a="28916594" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 17:02:19 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 3/4] BaseTools: remove loop and variables. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 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" this loop does nothing. none of Key, Item, nor DevicePathList are ever used. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/Common/Misc.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Pyth= on/Common/Misc.py index 7d44fdcf8ba7..834c3a5321f0 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1495,21 +1495,8 @@ def AnalyzePcdExpression(Setting): return FieldList =20 def ParseDevPathValue (Value): - DevPathList =3D [ "Path","HardwarePath","Pci","PcCard","MemoryMapped",= "VenHw","Ctrl","BMC","AcpiPath","Acpi","PciRoot", - "PcieRoot","Floppy","Keyboard","Serial","ParallelPort"= ,"AcpiEx","AcpiExp","AcpiAdr","Msg","Ata","Scsi", - "Fibre","FibreEx","I1394","USB","I2O","Infiniband","Ve= nMsg","VenPcAnsi","VenVt100","VenVt100Plus", - "VenUtf8","UartFlowCtrl","SAS","SasEx","NVMe","UFS","S= D","eMMC","DebugPort","MAC","IPv4","IPv6","Uart", - "UsbClass","UsbAudio","UsbCDCControl","UsbHID","UsbIma= ge","UsbPrinter","UsbMassStorage","UsbHub", - "UsbCDCData","UsbSmartCard","UsbVideo","UsbDiagnostic"= ,"UsbWireless","UsbDeviceFirmwareUpdate", - "UsbIrdaBridge","UsbTestAndMeasurement","UsbWwid","Uni= t","iSCSI","Vlan","Uri","Bluetooth","Wi-Fi", - "MediaPath","HD","CDROM","VenMedia","Media","Fv","FvFi= le","Offset","RamDisk","VirtualDisk","VirtualCD", - "PersistentVirtualDisk","PersistentVirtualCD","BbsPath= ","BBS","Sata" ] if '\\' in Value: Value.replace('\\', '/').replace(' ', '') - for Item in Value.split('/'): - Key =3D Item.strip().split('(')[0] - if Key not in DevPathList: - pass =20 Cmd =3D 'DevicePath ' + '"' + Value + '"' try: --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 14:38: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 1522281754517422.5588513085395; Wed, 28 Mar 2018 17:02:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 67A08224DD13E; Wed, 28 Mar 2018 16:55:47 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 3DA88224DD12B for ; Wed, 28 Mar 2018 16:55:44 -0700 (PDT) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 17:02:22 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 17:02:22 -0700 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=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,374,1517904000"; d="scan'208";a="28916598" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Wed, 28 Mar 2018 17:02:20 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 4/4] BaseTools: cleanup class heirarchy X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 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" remove totally empty classes from class heirarchy Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/Common/DecClassObject.py | 13 +----= -------- BaseTools/Source/Python/Common/DscClassObject.py | 13 +----= -------- BaseTools/Source/Python/Common/FdfClassObject.py | 12 +----= ------- BaseTools/Source/Python/Common/InfClassObject.py | 13 +----= -------- BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 13 +----= -------- 5 files changed, 5 insertions(+), 59 deletions(-) diff --git a/BaseTools/Source/Python/Common/DecClassObject.py b/BaseTools/S= ource/Python/Common/DecClassObject.py index d7c70a7336a0..4d267f147f05 100644 --- a/BaseTools/Source/Python/Common/DecClassObject.py +++ b/BaseTools/Source/Python/Common/DecClassObject.py @@ -48,21 +48,10 @@ Section =3D {TAB_UNKNOWN.upper() : MODEL_UNKNOWN, } =20 =20 -## DecObject -# -# This class defined basic Dec object which is used by inheriting -#=20 -# @param object: Inherited from object class -# -class DecObject(object): - def __init__(self): - object.__init__() - ## Dec # # This class defined the structure used in Dec object #=20 -# @param DecObject: Inherited from DecObject class # @param Filename: Input value for Filename of Dec file, default = is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -82,7 +71,7 @@ class DecObject(object): # @var Contents: To store value for Contents, it is a structure= as DecContents # @var KeyList: To store value for KeyList, a list for all Key= s used in Dec # -class Dec(DecObject): +class Dec(object): def __init__(self, Filename=3DNone, IsToDatabase=3DFalse, IsToPackage= =3DFalse, WorkspaceDir=3DNone, Database=3DNone, SupArchList=3DDataType.ARCH= _LIST): self.Identification =3D Identification() self.Package =3D PackageClass() diff --git a/BaseTools/Source/Python/Common/DscClassObject.py b/BaseTools/S= ource/Python/Common/DscClassObject.py index c2fa1c275a2d..d14b6a718522 100644 --- a/BaseTools/Source/Python/Common/DscClassObject.py +++ b/BaseTools/Source/Python/Common/DscClassObject.py @@ -54,21 +54,10 @@ Section =3D {TAB_UNKNOWN.upper() : MODEL_UNKNOWN, TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION } =20 -## DscObject -# -# This class defined basic Dsc object which is used by inheriting -# -# @param object: Inherited from object class -# -class DscObject(object): - def __init__(self): - object.__init__() - ## Dsc # # This class defined the structure used in Dsc object # -# @param DscObject: Inherited from InfObject class # @param Ffilename: Input value for Ffilename of Inf file, default= is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -89,7 +78,7 @@ class DscObject(object): # @var WorkspaceDir: To store value for WorkspaceDir # @var KeyList: To store value for KeyList, a list for all Key= s used in Dec # -class Dsc(DscObject): +class Dsc(object): _NullClassIndex =3D 0 =20 def __init__(self, Filename=3DNone, IsToDatabase=3DFalse, IsToPlatform= =3DFalse, WorkspaceDir=3DNone, Database=3DNone): diff --git a/BaseTools/Source/Python/Common/FdfClassObject.py b/BaseTools/S= ource/Python/Common/FdfClassObject.py index 3e7d44954c88..b3b45f634ed8 100644 --- a/BaseTools/Source/Python/Common/FdfClassObject.py +++ b/BaseTools/Source/Python/Common/FdfClassObject.py @@ -19,25 +19,15 @@ from Table.TableFdf import TableFdf from CommonDataClass.DataClass import MODEL_FILE_FDF, MODEL_PCD, MODEL_MET= A_DATA_COMPONENT from String import NormPath =20 -## FdfObject -# -# This class defined basic Fdf object which is used by inheriting -#=20 -# @param object: Inherited from object class -# -class FdfObject(object): - def __init__(self): - object.__init__() =20 ## Fdf # # This class defined the structure used in Fdf object #=20 -# @param FdfObject: Inherited from FdfObject class # @param Filename: Input value for Ffilename of Fdf file, default is = None # @param WorkspaceDir: Input value for current workspace directory, defau= lt is None # -class Fdf(FdfObject): +class Fdf(object): def __init__(self, Filename =3D None, IsToDatabase =3D False, Workspac= eDir =3D None, Database =3D None): self.WorkspaceDir =3D WorkspaceDir self.IsToDatabase =3D IsToDatabase diff --git a/BaseTools/Source/Python/Common/InfClassObject.py b/BaseTools/S= ource/Python/Common/InfClassObject.py index f24e4e41a0c1..89e110ea5e7a 100644 --- a/BaseTools/Source/Python/Common/InfClassObject.py +++ b/BaseTools/Source/Python/Common/InfClassObject.py @@ -131,21 +131,10 @@ class InfHeader(ModuleHeaderClass): def __contains__(self, key): return key in self._Mapping_ =20 -## InfObject -# -# This class defined basic Inf object which is used by inheriting -# -# @param object: Inherited from object class -# -class InfObject(object): - def __init__(self): - object.__init__() - ## Inf # # This class defined the structure used in Inf object # -# @param InfObject: Inherited from InfObject class # @param Ffilename: Input value for Ffilename of Inf file, default= is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -163,7 +152,7 @@ class InfObject(object): # @var WorkspaceDir: To store value for WorkspaceDir # @var KeyList: To store value for KeyList, a list for all Key= s used in Inf # -class Inf(InfObject): +class Inf(object): def __init__(self, Filename=3DNone, IsToDatabase=3DFalse, IsToModule= =3DFalse, WorkspaceDir=3DNone, Database=3DNone, SupArchList=3DDataType.ARCH= _LIST): self.Identification =3D Identification() self.Module =3D ModuleClass() diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.p= y b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index ba478f9ecf10..b60e8f50e4f2 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -1900,25 +1900,14 @@ class DecParser(MetaFileParser): } =20 =20 -## FdfObject -# -# This class defined basic Fdf object which is used by inheriting -#=20 -# @param object: Inherited from object class -# -class FdfObject(object): - def __init__(self): - object.__init__() - ## Fdf # # This class defined the structure used in Fdf object #=20 -# @param FdfObject: Inherited from FdfObject class # @param Filename: Input value for Ffilename of Fdf file, default is = None # @param WorkspaceDir: Input value for current workspace directory, defau= lt is None # -class Fdf(FdfObject): +class Fdf(object): def __init__(self, Filename =3D None, IsToDatabase =3D False, Workspac= eDir =3D None, Database =3D None): self.WorkspaceDir =3D WorkspaceDir self.IsToDatabase =3D IsToDatabase --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel