From 64243c5171ed352a7f27732466010f2475ac25b9 Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Thu, 20 Jun 2024 15:40:21 +0530 Subject: [PATCH] Fix cfnlint breaking changes cfnlint 1.3.0 has removed the cfnlint.core.configure_logging() function --- moto/cloudformation/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/cloudformation/utils.py b/moto/cloudformation/utils.py index 3a18868f9f32..b4d3bc9d4dd3 100644 --- a/moto/cloudformation/utils.py +++ b/moto/cloudformation/utils.py @@ -59,7 +59,7 @@ def _f(loader: Any, tag: Any, node: Any) -> Any: def validate_template_cfn_lint(template: str) -> List[Any]: # Importing cfnlint adds a significant overhead, so we keep it local - from cfnlint import core, decode + from cfnlint import core, decode, config # Save the template to a temporary file -- cfn-lint requires a file filename = "file.tmp" @@ -76,7 +76,7 @@ def validate_template_cfn_lint(template: str) -> List[Any]: template, matches = decode.decode(abs_filename) # Set cfn-lint to info - core.configure_logging(None) + config.configure_logging(None, False) # Initialize the ruleset to be applied (no overrules, no excludes) rules = core.get_rules([], [], [])