Skip to content

Commit 28c9006

Browse files
committed
Add missing report warnings
1 parent 863ef2f commit 28c9006

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

SparkFunKiCadPanelizer/panelizer/panelizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
10551055
if wx.GetApp() is not None:
10561056
resp = wx.MessageBox("Ordering Instructions not found!\nNo futher warnings will be given.",
10571057
'Warning', wx.OK | wx.ICON_WARNING)
1058+
report += "Ordering Instructions not found! No futher ordering warnings will be given.\n"
10581059
sysExit = 1
10591060

10601061
if ordering is None:
@@ -1168,6 +1169,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
11681169
refs += "," + keys
11691170
resp = wx.MessageBox("Empty (undefined) PROD_IDs found!\n" + refs,
11701171
'Warning', wx.OK | wx.ICON_WARNING)
1172+
report += "Empty (undefined) PROD_IDs found!" + refs + "\n"
11711173
sysExit = 1
11721174

11731175
if sysExit < 0:

SparkFunKiCadPanelizer/plugin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ def run_panelizer(dlg, p_panelizer):
124124

125125
if board is not None:
126126
sysExit, report = p_panelizer.startPanelizerCommand(command, board, self.ordering_instructions, self.logger)
127-
self.logger.log(logging.DEBUG if sysExit == 0 else logging.ERROR, report)
127+
logWarn = logging.DEBUG
128+
if sysExit >= 1:
129+
logWarn = logging.WARN
130+
if sysExit >= 2:
131+
logWarn = logging.ERROR
132+
self.logger.log(logWarn, report)
128133
if sysExit > 0:
129134
wx.MessageBox("Panelizer " + ("warning" if (sysExit == 1) else "error") + ".\nPlease check panelizer.log for details.",
130135
("Warning" if (sysExit == 1) else "Error"), wx.OK | (wx.ICON_WARNING if (sysExit == 1) else wx.ICON_ERROR))

0 commit comments

Comments
 (0)