aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-07-24 18:01:39 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-07-24 18:01:39 +0200
commit6eb5b242d0be07c0d73c3b0c0adfc33ecfa051e9 (patch)
tree42d782278a25ade1c5a53556707ec6db257166df
parentee520323410a7f6982f40fe9c6631c3b936bcd2d (diff)
downloadee-python-6eb5b242d0be07c0d73c3b0c0adfc33ecfa051e9.tar.gz
ee-python-6eb5b242d0be07c0d73c3b0c0adfc33ecfa051e9.tar.bz2
ee-python-6eb5b242d0be07c0d73c3b0c0adfc33ecfa051e9.tar.xz
ee-python-6eb5b242d0be07c0d73c3b0c0adfc33ecfa051e9.zip
wip.
-rw-r--r--src/ee/ds/__init__.py2
-rw-r--r--src/ee/kicad/doit.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ee/ds/__init__.py b/src/ee/ds/__init__.py
index c8c21dd..aff5b64 100644
--- a/src/ee/ds/__init__.py
+++ b/src/ee/ds/__init__.py
@@ -1,7 +1,7 @@
import configparser
+import csv
import logging
import os
-import csv
from functools import total_ordering
from pathlib import Path
from typing import MutableMapping, Optional, List, Tuple, Union, Iterator
diff --git a/src/ee/kicad/doit.py b/src/ee/kicad/doit.py
index 1d0a1ed..299d3ce 100644
--- a/src/ee/kicad/doit.py
+++ b/src/ee/kicad/doit.py
@@ -184,6 +184,8 @@ def task_kicad_create_component_data_set():
logger.info("processing {} kicad-sch".format(len(kicad_sch)))
+ ignored_ref_types = set("#PRW")
+
for sch in kicad_sch:
ref = sch.get("ref")
ref_num = sch.get("ref-num")
@@ -192,7 +194,7 @@ def task_kicad_create_component_data_set():
continue
ref_type = sch.get("ref-type")
- if not ref_type or ref_type == "#PWR":
+ if not ref_type or ref_type in ignored_ref_types:
logger.debug("Missing ref-type or bad ref-type: ref={}, ref-type={}".format(ref, ref_type))
continue