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
5129048c
Commit
5129048c
authored
1 year ago
by
Wouter Deconinck
Committed by
MarkusFrankATcernch
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: split comma-separated string into list of dict
parent
d4ac0711
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/Helper/Action.py
+1
-1
1 addition, 1 deletion
DDG4/python/DDSim/Helper/Action.py
with
1 addition
and
1 deletion
DDG4/python/DDSim/Helper/Action.py
+
1
−
1
View file @
5129048c
...
@@ -138,7 +138,7 @@ On the command line, these can be specified as JSON strings.
...
@@ -138,7 +138,7 @@ On the command line, these can be specified as JSON strings.
try
:
try
:
val
=
json
.
loads
(
val
)
val
=
json
.
loads
(
val
)
except
ValueError
:
except
ValueError
:
val
=
tuple
(
val
.
split
(
"
,
"
)
)
val
=
[
dict
(
name
=
v
)
for
v
in
val
.
split
(
"
,
"
)
]
if
isinstance
(
val
,
tuple
):
if
isinstance
(
val
,
tuple
):
# assumes: ( "Geant4TestEventAction", {"Property_int": 10} )
# assumes: ( "Geant4TestEventAction", {"Property_int": 10} )
# creates: { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} }
# creates: { "name": "Geant4TestEventAction", "parameter": {"Property_int": 10} }
...
...
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