Skip to content

Commit

Permalink
[Fixed] Some times we don't initialize the global options
Browse files Browse the repository at this point in the history
So we don't need to check if the global work layer is valid all the time
  • Loading branch information
set-soft committed Nov 12, 2024
1 parent 6b1d787 commit 4ef4e0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kibot/kiplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def load_board(pcb_file=None, forced=False):
try:
with hide_stderr():
board = pcbnew.LoadBoard(pcb_file)
if board.GetLayerID(GS.global_work_layer) < 0:
if GS.global_work_layer and board.GetLayerID(GS.global_work_layer) < 0:
raise KiPlotConfigurationError(f"Unknown layer used for the global `work_layer` option"
f" (`{GS.global_work_layer}`)")

Expand Down

0 comments on commit 4ef4e0f

Please sign in to comment.