Skip to content
Snippets Groups Projects
Commit 8d70c518 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-50: Fixed program options parsing

parent 59fb6a79
No related branches found
No related tags found
No related merge requests found
...@@ -762,7 +762,6 @@ def batch_produce_xcstatistics(integration_time, ...@@ -762,7 +762,6 @@ def batch_produce_xcstatistics(integration_time,
time.sleep(w) time.sleep(w)
set_mode(0) # SWITCH BACK TO MODE 0 AT THE END
# ----------------------------------MAIN CODE LOGIC # ----------------------------------MAIN CODE LOGIC
def setup_logging(): def setup_logging():
...@@ -784,7 +783,8 @@ def init(): ...@@ -784,7 +783,8 @@ def init():
def setup_command_argument_parser(): def setup_command_argument_parser():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Records the xcstatistics.\n NOTE that is best to use this script with swlevel=2 has it will not interfere with other software running on the station.\nex: python /opt/stationtest/rspctlprobe.py --mode 3 --xcsubband 150:250:50 --xcstatistics --integration 1 --duration 5 --wait 10 --loops 2 --directory /localhome/data") formatter_class=argparse.RawDescriptionHelpFormatter,
description="Records the xcstatistics.\nNOTE that is best to use this script with swlevel=2 has it will not interfere with other software running on the station.\nex: python /opt/stationtest/rspctlprobe.py --mode 3 --xcsubband 150:250:50 --xcstatistics --integration 1 --duration 5 --wait 10 --loops 2 --directory /localhome/data")
parser.add_argument('--xcstatistics', action='store_true') parser.add_argument('--xcstatistics', action='store_true')
parser.add_argument('--integration', type=int, default=[1], nargs='+') parser.add_argument('--integration', type=int, default=[1], nargs='+')
...@@ -839,6 +839,7 @@ def parse_and_execute_command_arguments(): ...@@ -839,6 +839,7 @@ def parse_and_execute_command_arguments():
mode=program_arguments.mode, mode=program_arguments.mode,
add_options=options, add_options=options,
output_directory=program_arguments.directory) output_directory=program_arguments.directory)
set_mode(0) # SWITCH BACK TO MODE 0 AT THE END
except Exception as e: except Exception as e:
logger.error('error executing rspctl : %s', e) logger.error('error executing rspctl : %s', e)
logger.error('traceback \n%s', traceback.format_exc()) logger.error('traceback \n%s', traceback.format_exc())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment