better error handling for copy_from_Kicad.py #180

This commit is contained in:
andreika-git 2022-09-10 15:25:26 +03:00
parent 752078072b
commit 539406e54f
2 changed files with 3 additions and 2 deletions

View File

@ -163,6 +163,9 @@ with open(src_name + "-all-pos.csv", 'rt') as src_f, open(dst_name + "-CPL.csv",
# fix kicad's negative x coord for bottom-placed components
if (side.lower() == "bottom"):
posx = str(-float(posx))
if des not in bom:
print ("Error! Designator " + des + " was not found in the BOM file!")
sys.exit(2)
if bom[des]:
for r in rotations:
if re.match(r, bom[des]):

View File

@ -19,5 +19,3 @@ source revision.txt
echo "BOARD_REVISION=[${BOARD_REVISION}]"
docker run --rm -t --user $(id -u):$(id -g) --entrypoint python3 -v "$(pwd)":/${PWD##*/} hellen-one ./bin/copy_from_Kicad.py "frames:${BOARD_PREFIX}" "/${PWD##*/}" "../../gerber" "${BOARD_SUFFIX}" "${BOARD_REVISION}"
echo "Done!"