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 <ashley.e.desim...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Puja Pandya <puja.pan...@intel.com>
Cc: Bret Barkelew <bret.barke...@microsoft.com>
Cc: Prince Agyeman <prince.agye...@intel.com>
Cc: Erik Bjorge <erik.c.bjo...@intel.com>
Signed-off-by: Erik Bjorge <erik.c.bjo...@intel.com>
---
 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_parser/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
             self.enableSub = (element.attrib['enableSubmodule'].lower() == 
'true')
         except Exception:
-            self.enableSub = False
+            try:
+                # Adding backwards compatibility with pin files that used 
incorrect attribute
+                self.enableSub = (element.attrib['enable_submodule'].lower() 
== 'true')
+            except Exception:
+                self.enableSub = False
 
         if self.branch is None and self.commit is None and self.tag is None:
             raise KeyError(ATTRIBUTE_MISSING_ERROR)
-- 
2.27.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61100): https://edk2.groups.io/g/devel/message/61100
Mute This Topic: https://groups.io/mt/74807386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to