Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
77aad6b8
Commit
77aad6b8
authored
1 year ago
by
Wouter Deconinck
Committed by
MarkusFrankATcernch
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: use dict.get with default empty
Co-authored-by:
Andre Sailer
<
andre.philippe.sailer@cern.ch
>
parent
938ac702
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/python/DDSim/DD4hepSimulation.py
+2
-3
2 additions, 3 deletions
DDG4/python/DDSim/DD4hepSimulation.py
with
2 additions
and
3 deletions
DDG4/python/DDSim/DD4hepSimulation.py
+
2
−
3
View file @
77aad6b8
...
...
@@ -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
)
# ----------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment