Fixed problems when using a hidden config file

- Found when using an output that needs the SCH, not specifying the
  SCH and more than one SCH was found.

Closes #138
This commit is contained in:
Salvador E. Tropea 2022-01-14 10:32:45 -03:00
parent e9e09a66a4
commit 8676f28f3a
2 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Gerber: job file didn't use the global output pattern. (#116)
- Warnings count
- Update XML: Removed the side effect Bom. (#106)
- Problems when using a hidden config file, using an output that needs the SCH,
not specifying the SCH and more than one SCH was found. (#138)
## [0.11.0] - 2021-04-25

View File

@ -116,6 +116,9 @@ def solve_schematic(a_schematic, a_board_file, config):
logger.info('Using SCH file: '+schematic)
elif len(schematics) > 1:
# Look for a schematic with the same name as the config
if config[0] == '.':
# Unhide hidden config
config = config[1:]
while '.' in config:
config = os.path.splitext(config)[0]
sch = config+'.sch'