Skip to content

Commit d34dead

Browse files
authored
https://github.com/aws-powertools/powertools-lambda-python/blob/adbd965671f9e2077eac36fd480b3814d7a9b978/aws_lambda_powertools/metrics/provider/cloudwatch_emf/cloudwatch.py#L383
Addressing issue #7467 Signed-off-by: Jota Feldmann <[email protected]>
1 parent adbd965 commit d34dead

File tree

1 file changed

+1
-1
lines changed
  • aws_lambda_powertools/metrics/provider/cloudwatch_emf

1 file changed

+1
-1
lines changed

aws_lambda_powertools/metrics/provider/cloudwatch_emf/cloudwatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def flush_metrics(self, raise_on_empty_metrics: bool = False) -> None:
390390
raise_on_empty_metrics : bool, optional
391391
raise exception if no metrics are emitted, by default False
392392
"""
393-
if not raise_on_empty_metrics and not self.metric_set:
393+
if not raise_on_empty_metrics:
394394
warnings.warn(
395395
"No application metrics to publish. The cold-start metric may be published if enabled. "
396396
"If application metrics should never be empty, consider using 'raise_on_empty_metrics'",

0 commit comments

Comments
 (0)