Skip to content

Commit

Permalink
Make retrieval of parameters more robust in Frame python bindings (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed May 30, 2023
1 parent 76c98a6 commit 4a767cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/podio/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def get_parameter(self, name, as_type=None):
"""
def _get_param_value(par_type, name):
par_value = self._frame.getParameter[par_type](name)
if len(par_value) > 1:
return list(par_value)
return par_value[0]
if len(par_value) == 1:
return par_value[0]
return list(par_value)

# This access already raises the KeyError if there is no such parameter
par_type = self._param_key_types[name]
Expand Down

0 comments on commit 4a767cf

Please sign in to comment.