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
165bde24
Commit
165bde24
authored
May 09, 2020
by
Jose Enrique.Ruiz
Browse files
add -q flag to reset session and remove log file
parent
429aa4ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
osa/utils/cliopts.py
View file @
165bde24
...
...
@@ -501,6 +501,7 @@ def provprocessparsing():
parser
=
OptionParser
(
usage
=
message
)
parser
.
add_option
(
"-c"
,
"--config"
,
action
=
"store"
,
dest
=
"configfile"
,
default
=
"cfg/sequencer.cfg"
,
help
=
"use specific config file [default cfg/sequencer.cfg]"
)
parser
.
add_option
(
"-q"
,
action
=
"store_true"
,
dest
=
"quit"
,
help
=
"use this flag to reset session and remove log file"
)
# Parse the command line
(
opts
,
args
)
=
parser
.
parse_args
()
...
...
@@ -512,6 +513,7 @@ def provprocessparsing():
options
.
run
=
args
[
0
]
options
.
out
=
args
[
1
]
options
.
configfile
=
opts
.
configfile
options
.
quit
=
opts
.
quit
return
options
,
tag
...
...
provprocess.py
View file @
165bde24
...
...
@@ -160,9 +160,8 @@ if __name__ == "__main__":
# 02006
# /fefs/aswg/data/real/DL1/20200218/v0.4.3_v00
# -c cfg/sequencer.cfg
# TODO: add type of prov processing to be done as arg - now only r0_to_dl1
# TODO: add flag to remove log file, normally after dl1_to_dl2
# -q
# TODO: add type of prov processing to be done as arg - now only r0_to_dl1 in parse_lines_dl1
options
,
tag
=
cliopts
.
provprocessparsing
()
...
...
@@ -206,9 +205,9 @@ if __name__ == "__main__":
shutil
.
move
(
session_logfilename
,
log_path
)
# remove LOG_FILENAME
# TODO: only if flag remove is set
remove_log_file
=
Path
(
LOG_FILENAME
)
remove_log_file
.
unlink
()
if
options
.
quit
:
remove_log_file
=
Path
(
LOG_FILENAME
)
remove_log_file
.
unlink
()
# make json
try
:
...
...
Write
Preview
Supports
Markdown
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