remove debug prints and raise actual Exception
this should be replaced with an actual typed exception
This commit is contained in:
parent
261b3e91e7
commit
3984abc2f3
1 changed files with 1 additions and 3 deletions
|
@ -61,12 +61,11 @@ class APIObject(BaseObject):
|
||||||
if self.is_connected:
|
if self.is_connected:
|
||||||
self.kicad_board = self.kicad.get_board()
|
self.kicad_board = self.kicad.get_board()
|
||||||
polygons = Board.extract_polygons(self.kicad_board)
|
polygons = Board.extract_polygons(self.kicad_board)
|
||||||
print('>', polygons)
|
|
||||||
|
|
||||||
for poly in polygons:
|
for poly in polygons:
|
||||||
self.polygons[poly.id.value] = poly
|
self.polygons[poly.id.value] = poly
|
||||||
else:
|
else:
|
||||||
print('*****NOT CONNECTED')
|
raise Exception('KiCAD API not connected.')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
|
@ -77,7 +76,6 @@ class APIObject(BaseObject):
|
||||||
return self.feature.Connected
|
return self.feature.Connected
|
||||||
|
|
||||||
def get_polygon(self, polygon_id):
|
def get_polygon(self, polygon_id):
|
||||||
print(polygon_id, self.polygons)
|
|
||||||
self.refresh_polygons()
|
self.refresh_polygons()
|
||||||
return self.polygons.get(polygon_id)
|
return self.polygons.get(polygon_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue