diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-08-15 13:33:29 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-08-15 13:33:29 +0200 |
commit | db80ff609d570f6074eb35758304a0141a24050a (patch) | |
tree | bce0a801e1ca0046b5e3ee02d32bffc3457709c7 /src/ee/tools/create_bom.py | |
parent | f328b015085be3eab7800e6f87cf1ae704486c0a (diff) | |
download | ee-python-db80ff609d570f6074eb35758304a0141a24050a.tar.gz ee-python-db80ff609d570f6074eb35758304a0141a24050a.tar.bz2 ee-python-db80ff609d570f6074eb35758304a0141a24050a.tar.xz ee-python-db80ff609d570f6074eb35758304a0141a24050a.zip |
create-bom: Add support for passing arguments to tool. Implement
fail_on_missing_parts in the CLI.
ee: Add StopToolException, makes for a more graceful exit(1) if a tool
wants to stop immediately.
Diffstat (limited to 'src/ee/tools/create_bom.py')
-rw-r--r-- | src/ee/tools/create_bom.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ee/tools/create_bom.py b/src/ee/tools/create_bom.py index afeb67e..f98edd9 100644 --- a/src/ee/tools/create_bom.py +++ b/src/ee/tools/create_bom.py @@ -24,11 +24,14 @@ parser.add_argument("--part-db", parser.add_argument("--strategy", metavar="FUNC") +parser.add_argument("--fail-on-missing", + action="store_true") + args = parser.parse_args() ee.tools.process_default_argparse_group(args) project = Project.load() part_db_dirs = [Path(part_db) for part_db in args.part_db] -fail_on_missing_parts = False +fail_on_missing_parts = args.fail_on_missing create_bom(project, Path(args.schematic), Path(args.out), part_db_dirs, fail_on_missing_parts, args.strategy) |