From f8703ee3820431ec0dbff4c9e10f0cb75a4da03c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 30 Apr 2019 08:53:00 +0200 Subject: part: o Removing debugging info. --- src/ee/part/excel.py | 5 ----- src/ee/tools/part_from_excel.py | 1 - 2 files changed, 6 deletions(-) diff --git a/src/ee/part/excel.py b/src/ee/part/excel.py index cbbffde..12b583d 100644 --- a/src/ee/part/excel.py +++ b/src/ee/part/excel.py @@ -22,23 +22,18 @@ def from_excel(path: Path, sheet_name: Optional[str]) -> PartDb: sheet = list(sheet) header: Mapping[str, int] = {name.lower(): idx for idx, name in enumerate(sheet[0]) if len(name.strip())} - print(header) mpn_idx = header.get("mpn", None) desc_idx = header.get("description", None) price_idx = header.get("price", None) url_idx = header.get("url", None) - print("mpn: {}, desc: {}, price: {}, url: {}".format(mpn_idx, desc_idx, price_idx, url_idx)) - for idx, row in enumerate(sheet[1:], 1): mpn = row[mpn_idx] if mpn_idx is not None else "" desc = row[desc_idx].strip() if desc_idx is not None else "" price = row[price_idx] if price_idx is not None else None url = row[url_idx] if url_idx is not None else None - print(row[desc_idx]) - if len(mpn) == 0 and len(desc) == 0: print("Bad part, line #{}. MPN or description is required".format(idx)) continue diff --git a/src/ee/tools/part_from_excel.py b/src/ee/tools/part_from_excel.py index 63c7b65..f14bc45 100644 --- a/src/ee/tools/part_from_excel.py +++ b/src/ee/tools/part_from_excel.py @@ -23,5 +23,4 @@ args = parser.parse_args() out_path = Path(args.out_path) part_db = from_excel(Path(args.in_path), args.sheet) -print("len={}".format(part_db.size())) save_db(out_path, part_db) -- cgit v1.2.3