mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-24 22:17:39 -04:00
Improve ibex_config command line handling with missing output_fn
We need to check that the output type is actually supplied, otherwise we spit out a rather mysterious error a few lines later.
This commit is contained in:
parent
86084b9d3d
commit
77d8010015
1 changed files with 7 additions and 2 deletions
|
@ -257,14 +257,19 @@ def main():
|
||||||
default=get_config_file_location())
|
default=get_config_file_location())
|
||||||
|
|
||||||
arg_subparser = argparser.add_subparsers(
|
arg_subparser = argparser.add_subparsers(
|
||||||
title='output type',
|
help='Format to output the configuration parameters in',
|
||||||
help='Format to output the configuration parameters in')
|
dest='output_fn',
|
||||||
|
metavar='output_type')
|
||||||
|
|
||||||
for outputter in outputters:
|
for outputter in outputters:
|
||||||
outputter.setup_args(arg_subparser)
|
outputter.setup_args(arg_subparser)
|
||||||
|
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
|
|
||||||
|
if args.output_fn is None:
|
||||||
|
print('ERROR: No output format specified.')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config_file = open(args.config_filename)
|
config_file = open(args.config_filename)
|
||||||
config_dicts = get_config_dicts(config_file)
|
config_dicts = get_config_dicts(config_file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue