aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-10-15 15:52:15 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-10-15 15:52:15 +0200
commit69e3e5ef16a14956e2077891ae9acb835317011e (patch)
tree7f3d30e4f6eebf7719aba3cc5fcdb027905d475a
parent3d7196280c57f05d3eb25567f4483ab8e89d29e1 (diff)
downloadee-python-69e3e5ef16a14956e2077891ae9acb835317011e.tar.gz
ee-python-69e3e5ef16a14956e2077891ae9acb835317011e.tar.bz2
ee-python-69e3e5ef16a14956e2077891ae9acb835317011e.tar.xz
ee-python-69e3e5ef16a14956e2077891ae9acb835317011e.zip
bom-to-csv: Fixing, was broken after generate_bom refactoring.
-rw-r--r--src/ee/tools/bom_to_csv.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ee/tools/bom_to_csv.py b/src/ee/tools/bom_to_csv.py
index 181eb4e..99aa98f 100644
--- a/src/ee/tools/bom_to_csv.py
+++ b/src/ee/tools/bom_to_csv.py
@@ -35,14 +35,14 @@ out_path = Path(args.out)
bom_parts, supplier_parts = load_bom(bom_path, part_files)
check_bom(bom_parts, supplier_parts)
-lines = generate_bom(args.allow_incomplete, bom_parts, supplier_parts)
+bom = generate_bom(args.allow_incomplete, bom_parts, supplier_parts)
-if lines is not None:
+if bom is not None:
with out_path.open("w") as f:
w = csv.writer(f)
w.writerow(["Quantity", "MPN", "SPN", "References"])
- for line in lines:
+ for line in bom.lines:
mpn = line.part.get_only_mpn()
spn = line.part.get_only_spn()