From 54ef609bfffc448330d2a33484c7ac163fac1422 Mon Sep 17 00:00:00 2001 From: Maximilian Eschenbacher Date: Thu, 19 Sep 2024 17:27:40 +0200 Subject: [PATCH] shade_check: produce error and raise exception Align shade_check behaviour as described in the docs. --- capirca/aclgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/capirca/aclgen.py b/capirca/aclgen.py index fe29dbe7..545d50b8 100644 --- a/capirca/aclgen.py +++ b/capirca/aclgen.py @@ -215,8 +215,8 @@ def RenderFile(base_directory: str, input_file: pathlib.Path, base_dir=base_directory, shade_check=shade_check) except policy.ShadingError as e: - logging.warning('shading errors for %s:\n%s', input_file, e) - return + logging.error('shading errors for %s:\n%s', input_file, e) + raise except (policy.Error, naming.Error): raise ACLParserError('Error parsing policy file %s:\n%s%s' % (input_file, sys.exc_info()[0], sys.exc_info()[1]))