aboutsummaryrefslogtreecommitdiff
path: root/src/ee/bom.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/bom.py')
-rw-r--r--src/ee/bom.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ee/bom.py b/src/ee/bom.py
index 96da25a..e12260c 100644
--- a/src/ee/bom.py
+++ b/src/ee/bom.py
@@ -3,7 +3,7 @@ import pydoc
from pathlib import Path
from typing import List, Optional
-from ee import EeException
+from ee import EeException, StopToolException
from ee.db import ObjDb
from ee.logging import log
from ee.part import PartDb, load_db, save_db, Part, fact_keys
@@ -134,12 +134,12 @@ def create_bom(project: Project, schematic_path: Path, out_path: Path, part_dbs:
bom_parts.add_multi_index("supplier,part", lambda op: (
op.selected_part.supplier, op.selected_part.uri) if op.selected_part else None)
- if len(unresolved_parts) and fail_on_missing_parts:
- raise EeException("The bom has parts that can't be found from any supplier")
-
out_file = project.report_dir / (os.path.splitext(out_path.name)[0] + ".rst")
make_report(out_file, unresolved_parts, bom_parts, supplier_parts)
+ if len(unresolved_parts) and fail_on_missing_parts:
+ raise StopToolException("The bom has parts that can't be found from any supplier")
+
out_parts = PartDb()
found_parts = 0
for bom_part in bom_parts: