Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maximilian Nöthe
LSTOSA
Commits
3569c02f
Commit
3569c02f
authored
Apr 13, 2020
by
Jose Enrique.Ruiz
Browse files
add prov file and out folder existence checking
parent
6f46f890
Changes
2
Hide whitespace changes
Inline
Side-by-side
osa/utils/cliopts.py
View file @
3569c02f
...
...
@@ -507,7 +507,7 @@ def provprocessparsing():
options
.
out
=
args
[
1
]
options
.
src
=
opts
.
provfile
return
options
return
options
,
tag
##############################################################################
...
...
provprocess.py
View file @
3569c02f
...
...
@@ -46,24 +46,24 @@ def make_graph(filepath):
if
__name__
==
"__main__"
:
from
osa.utils
import
cliopts
options
=
cliopts
.
provprocessparsing
()
from
osa.utils
import
cliopts
,
standardhandle
options
,
tag
=
cliopts
.
provprocessparsing
()
# check options.src is a file
#
#
if
not
Path
(
options
.
src
).
exists
():
standardhandle
.
error
(
tag
,
f
"file
{
options
.
src
}
does not exist"
,
2
)
# check options.out is a folder
if
not
Path
(
options
.
out
).
exists
():
standardhandle
.
error
(
tag
,
f
"path
{
options
.
out
}
does not exist"
,
2
)
# check options.out is a valid folder
# make folder log/ if does not exist
# add log/ to options.out = /fefs/aswg/data/real/DL1/20200218/v0.4.3_v00
#
#
options
.
out
=
Path
(
options
.
out
)
options
.
out
=
Path
(
options
.
out
)
/
"log"
if
not
options
.
out
.
exists
():
options
.
out
.
mkdir
()
# process prov file
processed_lines
=
parse_lines_dl1
(
read_prov
(
logname
=
options
.
src
),
options
.
out
)
#
#
# build base_filename with options.run and options.out
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment