From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.5930.1591827271718321691 for ; Wed, 10 Jun 2020 15:14:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: erik.c.bjorge@intel.com) IronPort-SDR: ZrDrHpFepRGKbd9OSPPUExeToU9xQpk8VU2K2Ji2nOVAPlxtz6dohYvuoZsa6QxJojr25nHkRn 5Ki8chZdrAuw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2020 15:14:31 -0700 IronPort-SDR: 8/y446hZWDYLXxK65fZ//g5CyFG/+8tBHQpKocCTqFrCfnnVf/7bZVDIfpk1Fb4a44GivjUjtr Yyo5oXy0qu/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,497,1583222400"; d="scan'208";a="289345872" Received: from sfp-ecbjorge.amr.corp.intel.com ([10.165.41.176]) by orsmga002.jf.intel.com with ESMTP; 10 Jun 2020 15:14:30 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Ashley E Desimone , Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-staging/EdkRepo] [PATCH v2 2/3] EdkRepo: Adding backwards compatibility for old pin files Date: Wed, 10 Jun 2020 15:13:54 -0700 Message-Id: X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Older pin files used the invalid enable_submodule attribute. This has been fixed for new pin files but we need to be able to support older pin files as well. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Erik Bjorge --- edkrepo_manifest_parser/edk_manifest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/edkrepo_manifest_parser/edk_manifest.py b/edkrepo_manifest_par= ser/edk_manifest.py index adf6d52..00ad392 100644 --- a/edkrepo_manifest_parser/edk_manifest.py +++ b/edkrepo_manifest_parser/edk_manifest.py @@ -795,7 +795,11 @@ class _RepoSource(): # If enableSubmodule is not set to True then default to False= =0D self.enableSub =3D (element.attrib['enableSubmodule'].lower() = =3D=3D 'true')=0D except Exception:=0D - self.enableSub =3D False=0D + try:=0D + # Adding backwards compatibility with pin files that used = incorrect attribute=0D + self.enableSub =3D (element.attrib['enable_submodule'].low= er() =3D=3D 'true')=0D + except Exception:=0D + self.enableSub =3D False=0D =0D if self.branch is None and self.commit is None and self.tag is Non= e:=0D raise KeyError(ATTRIBUTE_MISSING_ERROR)=0D --=20 2.27.0.windows.1