From 4745a6ad458b4da8887e5c4df8a57d8eaa46c5bb Mon Sep 17 00:00:00 2001 From: RubelMozumder <32923026+RubelMozumder@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:50:10 +0100 Subject: [PATCH] Update pynxtools/dataconverter/template.py from Sheerjeel Co-authored-by: Sherjeel Shabih --- pynxtools/dataconverter/template.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pynxtools/dataconverter/template.py b/pynxtools/dataconverter/template.py index 8cb83a7da..0596c232d 100644 --- a/pynxtools/dataconverter/template.py +++ b/pynxtools/dataconverter/template.py @@ -137,17 +137,7 @@ def get(self, key, return_value=None): return : The value comes with return_value """ - val = self.optional.get(key, None) - if val is None: - val = self.recommended.get(key, None) - if val is None: - val = self.required.get(key, None) - if val is None: - val = self.undocumented.get(key, None) - if val is None: - return return_value - return val - + return self.__getitem__(key) def __getitem__(self, k): """Handles how values are accessed from the Template object.""" # Try setting item in all else throw error. Does not append to default.