Commit 3569c02f authored by Jose Enrique.Ruiz's avatar Jose Enrique.Ruiz
Browse files

add prov file and out folder existence checking

parent 6f46f890
......@@ -507,7 +507,7 @@ def provprocessparsing():
options.out = args[1]
options.src = opts.provfile
return options
return options, tag
##############################################################################
......
......@@ -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
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment