Fixed problems using E/DRC filters and the output dir didn't exist.
This commit is contained in:
parent
8fba0d9909
commit
111b86a375
|
|
@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Added
|
### Added
|
||||||
- `erc_warnings` pre-flight option to consider ERC warnings as errors.
|
- `erc_warnings` pre-flight option to consider ERC warnings as errors.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Problem when using E/DRC filters and the output dir didn't exist.
|
||||||
|
|
||||||
## [0.10.1] - 2021-02-22
|
## [0.10.1] - 2021-02-22
|
||||||
### Added
|
### Added
|
||||||
- GitLab CI workaround
|
- GitLab CI workaround
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2020 Salvador E. Tropea
|
# Copyright (c) 2020-2021 Salvador E. Tropea
|
||||||
# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial
|
# Copyright (c) 2020-2021 Instituto Nacional de Tecnología Industrial
|
||||||
# License: GPL-3.0
|
# License: GPL-3.0
|
||||||
# Project: KiBot (formerly KiPlot)
|
# Project: KiBot (formerly KiPlot)
|
||||||
# Contributors: Leandro Heck (@leoheck)
|
# Contributors: Leandro Heck (@leoheck)
|
||||||
|
|
@ -9,6 +9,7 @@ import re
|
||||||
from .gs import GS
|
from .gs import GS
|
||||||
from .error import KiPlotConfigurationError
|
from .error import KiPlotConfigurationError
|
||||||
from .optionable import Optionable
|
from .optionable import Optionable
|
||||||
|
from .kiplot import get_output_dir
|
||||||
from .macros import macros, document, pre_class # noqa: F401
|
from .macros import macros, document, pre_class # noqa: F401
|
||||||
from .log import get_logger
|
from .log import get_logger
|
||||||
|
|
||||||
|
|
@ -95,6 +96,7 @@ class Filters(BasePreFlight): # noqa: F821
|
||||||
def apply(self):
|
def apply(self):
|
||||||
# Create the filters file
|
# Create the filters file
|
||||||
if self._value:
|
if self._value:
|
||||||
GS.filter_file = os.path.join(GS.out_dir, 'kibot_errors.filter')
|
o_dir = get_output_dir('')
|
||||||
|
GS.filter_file = os.path.join(o_dir, 'kibot_errors.filter')
|
||||||
with open(GS.filter_file, 'w') as f:
|
with open(GS.filter_file, 'w') as f:
|
||||||
f.write(self._value)
|
f.write(self._value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue