remove debug prints and raise actual Exception

this should be replaced with an actual typed exception
This commit is contained in:
Morgan 'ARR\!' Allen 2025-10-15 11:11:58 -07:00
parent 261b3e91e7
commit 3984abc2f3

View file

@ -61,12 +61,11 @@ class APIObject(BaseObject):
if self.is_connected:
self.kicad_board = self.kicad.get_board()
polygons = Board.extract_polygons(self.kicad_board)
print('>', polygons)
for poly in polygons:
self.polygons[poly.id.value] = poly
else:
print('*****NOT CONNECTED')
raise Exception('KiCAD API not connected.')
@property
def is_connected(self):
@ -77,7 +76,6 @@ class APIObject(BaseObject):
return self.feature.Connected
def get_polygon(self, polygon_id):
print(polygon_id, self.polygons)
self.refresh_polygons()
return self.polygons.get(polygon_id)