From de4daddc52b7244ac257885a666c0ae94ae9dda1 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 16 Sep 2022 06:21:24 -0300 Subject: [PATCH] Assigned a number to the experimetal warning about missing refs Related to #248 --- kibot/misc.py | 1 + kibot/out_bom.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kibot/misc.py b/kibot/misc.py index 1b832197..9c4f6b13 100644 --- a/kibot/misc.py +++ b/kibot/misc.py @@ -228,6 +228,7 @@ W_NOPART = '(W095) ' W_MAXDEPTH = '(W096) ' W_3DRESVER = '(W097) ' W_DOWN3D = '(W098) ' +W_MISSREF = '(W099) ' # Somehow arbitrary, the colors are real, but can be different PCB_MAT_COLORS = {'fr1': "937042", 'fr2': "949d70", 'fr3': "adacb4", 'fr4': "332B16", 'fr5': "6cc290"} PCB_FINISH_COLORS = {'hal': "8b898c", 'hasl': "8b898c", 'imag': "8b898c", 'enig': "cfb96e", 'enepig': "cfb96e", diff --git a/kibot/out_bom.py b/kibot/out_bom.py index 8164f56c..6cf26907 100644 --- a/kibot/out_bom.py +++ b/kibot/out_bom.py @@ -21,7 +21,7 @@ from copy import deepcopy import os import re from .gs import GS -from .misc import W_BADFIELD, W_NEEDSPCB, DISTRIBUTORS, IFILT_EXPAND_TEXT_VARS, W_NOPART +from .misc import W_BADFIELD, W_NEEDSPCB, DISTRIBUTORS, IFILT_EXPAND_TEXT_VARS, W_NOPART, W_MISSREF from .optionable import Optionable, BaseOptions from .registrable import RegOutput from .error import KiPlotConfigurationError @@ -717,7 +717,7 @@ class BoMOptions(BaseOptions): except ValueError: msg = 'Missing `{}` in aggregated file `{}`'.format(ref_n, fname) if GS.global_csv_accept_no_ref: - logger.warning(msg) + logger.warning(W_MISSREF+msg) else: raise KiPlotConfigurationError(msg) return ref_index