Skip to content
Snippets Groups Projects
Commit 77aad6b8 authored by Wouter Deconinck's avatar Wouter Deconinck Committed by MarkusFrankATcernch
Browse files

fix: use dict.get with default empty


Co-authored-by: default avatarAndre Sailer <andre.philippe.sailer@cern.ch>
parent 938ac702
No related branches found
No related tags found
No related merge requests found
......@@ -357,9 +357,8 @@ class DD4hepSimulation(object):
(self.action.stack, DDG4.StackingAction, kernel.stackingAction)]:
for action_dict in action_list:
action = DDG4_Action(kernel, action_dict["name"])
if 'parameter' in action_dict.keys():
for parameter, value in action_dict['parameter'].items():
setattr(action, parameter, value)
for parameter, value in action_dict.get('parameter', {}).items():
setattr(action, parameter, value)
kernel_Action().add(action)
# ----------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment