Skip to content
Snippets Groups Projects
Commit dd622eb8 authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Merge branch 'use-internal-format-level' into 'master'

Use format field in file as lvcnrcheck default

See merge request !6
parents 090f64b2 c1df7f70
No related branches found
No related tags found
1 merge request!6Use format field in file as lvcnrcheck default
Pipeline #
......@@ -35,7 +35,11 @@ parser.add_argument(
help='use coloured output', action='store_true')
parser.add_argument(
'-f', '--format',
help='format level to use', type=int, choices=[1, 2, 3], default=1)
help=(
"format level to use, if not provided the format level specified in "
"file will be used, if the format field is missing from file format "
"level 1 will be used"),
type=int, choices=[1, 2, 3])
args = parser.parse_args()
# Define output syntax for a single field report
......@@ -92,7 +96,10 @@ if __name__ == '__main__':
print('')
if args.format > 1:
# Determine format level to check
fmt = args.format or sim.att('Format') or 1
if fmt > 1:
# Format 2
print('# Format 2\n')
......@@ -101,7 +108,7 @@ if __name__ == '__main__':
print('')
if args.format > 2:
if fmt > 2:
# Format 3
print('# Format 3\n')
......
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