Fixed: Most formats that needed layers didn't complain when ommited
This commit is contained in:
parent
8aaa07c867
commit
103ef8b79e
|
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- All pcbnew plot formats generated gerber job files
|
- All pcbnew plot formats generated gerber job files
|
||||||
|
- Most formats that needed layers didn't complain when ommited
|
||||||
|
|
||||||
## [0.2.4] - 2020-05-19
|
## [0.2.4] - 2020-05-19
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@ except ImportError: # pragma: no cover
|
||||||
sys.exit(misc.NO_YAML_MODULE)
|
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):
|
class CfgReader(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
@ -147,11 +153,6 @@ class CfgYamlReader(CfgReader):
|
||||||
|
|
||||||
def _parse_out_opts(self, otype, options, name):
|
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 from YAML keys to type_option keys
|
||||||
MAPPINGS = [
|
MAPPINGS = [
|
||||||
{
|
{
|
||||||
|
|
@ -524,7 +525,7 @@ class CfgYamlReader(CfgReader):
|
||||||
try:
|
try:
|
||||||
layers = o_obj['layers']
|
layers = o_obj['layers']
|
||||||
except KeyError:
|
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 +
|
logger.error('You must specify the layers for `' + name +
|
||||||
'` ('+otype+')')
|
'` ('+otype+')')
|
||||||
sys.exit(misc.EXIT_BAD_CONFIG)
|
sys.exit(misc.EXIT_BAD_CONFIG)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue