Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
wtlib
WindEnergyToolbox
Commits
de39dd1e
Commit
de39dd1e
authored
7 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
Improved error messages in high_level.py
parent
1f30ddeb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/dlc/high_level.py
+6
-2
6 additions, 2 deletions
wetb/dlc/high_level.py
with
6 additions
and
2 deletions
wetb/dlc/high_level.py
+
6
−
2
View file @
de39dd1e
...
...
@@ -236,16 +236,20 @@ class DLCHighLevel(object):
pass
elif
not
hasattr
(
self
,
"
res_folder
"
)
or
self
.
res_folder
==
""
:
files
=
glob
.
glob
(
os
.
path
.
join
(
self
.
res_path
,
"
*
"
+
ext
))
+
glob
.
glob
(
os
.
path
.
join
(
self
.
res_path
,
"
*/*
"
+
ext
))
if
len
(
files
)
==
0
:
raise
Exception
(
'
No *%s files found in:
\n
%s or
\n
%s
'
%
(
ext
,
self
.
res_path
,
os
.
path
.
join
(
self
.
res_path
,
"
*/
"
)))
else
:
files
=
[]
for
dlc_id
in
fatigue_dlcs
:
dlc_id
=
str
(
dlc_id
)
if
"
%
"
in
self
.
res_folder
:
folder
=
self
.
res_folder
%
dlc_id
else
:
folder
=
self
.
res_folder
files
.
extend
(
glob
.
glob
(
os
.
path
.
join
(
self
.
res_path
,
folder
,
"
*
"
+
ext
)))
dlc_files
=
(
glob
.
glob
(
os
.
path
.
join
(
self
.
res_path
,
folder
,
"
*
"
+
ext
)))
if
len
(
dlc_files
)
==
0
:
raise
Exception
(
'
DLC%s included in fatigue analysis, but no *%s files found in:
\n
%s
'
%
(
dlc_id
,
ext
,
os
.
path
.
join
(
self
.
res_path
,
folder
)))
files
.
extend
(
dlc_files
)
keys
=
list
(
zip
(
*
self
.
dist_value_keys
))[
1
]
fmt
=
self
.
format_tag_value
tags
=
[[
fmt
(
tag
.
replace
(
key
,
""
))
for
tag
,
key
in
zip
(
os
.
path
.
basename
(
f
).
split
(
"
_
"
),
keys
)]
for
f
in
files
]
...
...
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