Skip to content

Commit

Permalink
fix libary path problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cooked committed Mar 1, 2024
1 parent 78f2ec4 commit c21bca7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kimotor_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def init_path(self):
if self.fp_path is None:
self.fp_path = os.getenv("KICAD"+str(self.KICAD_VERSION)+"_FOOTPRINT_DIR", default=None)

# ensure only one separator
self.fp_path = os.path.normpath(self.fp_path) + os.sep

# no library found
if self.fp_path is None:
wx.LogError("Footprint library not found - Make sure the KiCad paths are properly configured.")
Expand Down Expand Up @@ -853,7 +856,7 @@ def do_mounting_holes(self, r_mh_out=0, n_mh_out=0, r_mh_in=0, n_mh_in=0, n_edge
# see https://forum.kicad.info/t/place-update-footprint-with-python/23103

if hs != "None":
fp_lib = self.fp_path + '/MountingHole.pretty'
fp_lib = self.fp_path + 'MountingHole.pretty'
fp = self.mhole_db.get(hs)
else:
return
Expand Down

0 comments on commit c21bca7

Please sign in to comment.