diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-04-30 08:53:00 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-04-30 08:53:00 +0200 |
commit | f8703ee3820431ec0dbff4c9e10f0cb75a4da03c (patch) | |
tree | 4fd80153c2cd7811b9ab995d0767e96e48bcc170 /src/ee/part | |
parent | 054019f7afb7aeeac680493c0b176eb35a832c96 (diff) | |
download | ee-python-f8703ee3820431ec0dbff4c9e10f0cb75a4da03c.tar.gz ee-python-f8703ee3820431ec0dbff4c9e10f0cb75a4da03c.tar.bz2 ee-python-f8703ee3820431ec0dbff4c9e10f0cb75a4da03c.tar.xz ee-python-f8703ee3820431ec0dbff4c9e10f0cb75a4da03c.zip |
part:
o Removing debugging info.
Diffstat (limited to 'src/ee/part')
-rw-r--r-- | src/ee/part/excel.py | 5 |
1 files changed, 0 insertions, 5 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 |