diff --git a/CHANGELOG.md b/CHANGELOG.md index 905d109b..6709f32f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `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 ### Added - GitLab CI workaround diff --git a/kibot/pre_filters.py b/kibot/pre_filters.py index d1fc2634..c937698d 100644 --- a/kibot/pre_filters.py +++ b/kibot/pre_filters.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2020 Salvador E. Tropea -# Copyright (c) 2020 Instituto Nacional de TecnologĂ­a Industrial +# Copyright (c) 2020-2021 Salvador E. Tropea +# Copyright (c) 2020-2021 Instituto Nacional de TecnologĂ­a Industrial # License: GPL-3.0 # Project: KiBot (formerly KiPlot) # Contributors: Leandro Heck (@leoheck) @@ -9,6 +9,7 @@ import re from .gs import GS from .error import KiPlotConfigurationError from .optionable import Optionable +from .kiplot import get_output_dir from .macros import macros, document, pre_class # noqa: F401 from .log import get_logger @@ -95,6 +96,7 @@ class Filters(BasePreFlight): # noqa: F821 def apply(self): # Create the filters file 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: f.write(self._value)