diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f16a40..66d302c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - All pcbnew plot formats generated gerber job files +- Most formats that needed layers didn't complain when ommited ## [0.2.4] - 2020-05-19 ### Changed diff --git a/kiplot/config_reader.py b/kiplot/config_reader.py index 517ec5be..f464288f 100644 --- a/kiplot/config_reader.py +++ b/kiplot/config_reader.py @@ -21,6 +21,12 @@ except ImportError: # pragma: no cover sys.exit(misc.NO_YAML_MODULE) +# note - type IDs are strings form the _config_, not the internal +# strings used as enums (in plot_config) +ANY_LAYER = ['gerber', 'ps', 'svg', 'hpgl', 'pdf', 'dxf'] +ANY_DRILL = ['excellon', 'gerb_drill'] + + class CfgReader(object): def __init__(self): pass @@ -147,11 +153,6 @@ class CfgYamlReader(CfgReader): def _parse_out_opts(self, otype, options, name): - # note - type IDs are strings form the _config_, not the internal - # strings used as enums (in plot_config) - ANY_LAYER = ['gerber', 'ps', 'svg', 'hpgl', 'pdf', 'dxf'] - ANY_DRILL = ['excellon', 'gerb_drill'] - # mappings from YAML keys to type_option keys MAPPINGS = [ { @@ -524,7 +525,7 @@ class CfgYamlReader(CfgReader): try: layers = o_obj['layers'] except KeyError: - if otype == 'pdf_pcb_print': + if otype == 'pdf_pcb_print' or otype in ANY_LAYER: logger.error('You must specify the layers for `' + name + '` ('+otype+')') sys.exit(misc.EXIT_BAD_CONFIG)