Skip to content

Commit

Permalink
Update pynxtools/dataconverter/template.py
Browse files Browse the repository at this point in the history
from Sheerjeel

Co-authored-by: Sherjeel Shabih <[email protected]>
  • Loading branch information
RubelMozumder and sherjeelshabih authored Nov 29, 2023
1 parent 129bcfb commit 4745a6a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pynxtools/dataconverter/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4745a6a

Please sign in to comment.