From a84632c164e54e44a4d446a9636809bc2e4fc15c Mon Sep 17 00:00:00 2001
From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com>
Date: Thu, 7 May 2020 17:23:07 +0300
Subject: [PATCH] Show what footprint file the script is looking for in case of
 error

---
 test.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test.py b/test.py
index 743f2d3..634abfe 100644
--- a/test.py
+++ b/test.py
@@ -36,10 +36,10 @@ def checkFootprint(lineNum, footprintField):
 		errorOnLine(lineNum, 'Footprint library name is wrong')
 	
 	if len(parts) > 1:
-		footpringPath = libraryName + '.pretty/' + parts[1] + '.kicad_mod'
-		footFileExists = path.exists(footpringPath)
+		footprintPath = libraryName + '.pretty/' + parts[1] + '.kicad_mod'
+		footFileExists = path.exists(footprintPath)
 		if footFileExists != True:
-			errorOnLine(lineNum, 'Footprint file does not exist')
+			errorOnLine(lineNum, 'Footprint file does not exist: ' + footprintPath)
 
 with open(libraryName + '.lib', 'r') as f:
 	lines = f.readlines()
-- 
GitLab