[Update_XML] Correct error when using wrong value

This commit is contained in:
Salvador E. Tropea 2022-09-21 12:41:30 -03:00
parent 58b7958899
commit 1042edbb0e
3 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,8 @@ class Update_XML(BasePreFlight): # noqa: F821
self._check_pcb_parity = f.check_pcb_parity
self.options = f
self._pcb_related = True
else:
raise KiPlotConfigurationError('must be boolean or dict')
self._sch_related = True
@classmethod

View File

@ -4,3 +4,4 @@ test_v5/
zone-refill.pro
fp-info-cache
*-bak
pcb_parity.xml

View File

@ -350,7 +350,7 @@ def test_error_wrong_type_3(test_dir):
def test_error_wrong_type_4(test_dir):
""" update_xml = number """
ctx = context.TestContext(test_dir, PRJ, 'error_pre_wrong_type_4')
ctx = context.TestContextSCH(test_dir, 'bom', 'error_pre_wrong_type_4')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("In preflight 'update_xml': must be boolean")
ctx.clean_up(keep_project=True)