IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
b36d7513
Commit
b36d7513
authored
3 years ago
by
Remy Prechelt
Committed by
ralfulrich
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make summary.yaml file optional for all outputs.
parent
1de042d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/corsika/io/outputs/output.py
+10
-8
10 additions, 8 deletions
python/corsika/io/outputs/output.py
with
10 additions
and
8 deletions
python/corsika/io/outputs/output.py
+
10
−
8
View file @
b36d7513
...
...
@@ -145,6 +145,9 @@ class Output(ABC):
"""
Load the top-level summary from a given library path.
If there is not a summary file for this output, then an
empty dictionary is returned.
Parameters
----------
path: str
...
...
@@ -154,12 +157,11 @@ class Output(ABC):
-------
dict:
The summary as a python dictionary.
Raises
------
FileNotFoundError
If the summary file cannot be found
"""
with
open
(
op
.
join
(
path
,
"
summary.yaml
"
),
"
r
"
)
as
f
:
return
yaml
.
load
(
f
,
Loader
=
yaml
.
Loader
)
# if the summary file doesn't exist, we just an empty dict
if
not
op
.
exists
(
op
.
join
(
path
,
"
summary.yaml
"
)):
return
{}
else
:
with
open
(
op
.
join
(
path
,
"
summary.yaml
"
),
"
r
"
)
as
f
:
return
yaml
.
load
(
f
,
Loader
=
yaml
.
Loader
)
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