From 740c765eec6a18a39d24a4a06e0c62792851dbcf Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Wed, 22 Feb 2023 11:49:44 +0200 Subject: [PATCH] fix: DeliveryStream was causing exceptions when disabled --- clickopsnotifier/delivery_stream.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clickopsnotifier/delivery_stream.py b/clickopsnotifier/delivery_stream.py index 83a218c..4281d9d 100644 --- a/clickopsnotifier/delivery_stream.py +++ b/clickopsnotifier/delivery_stream.py @@ -1,15 +1,16 @@ import boto3 import json +import logging class FakeClient: - def put_record_batch(self, Records=None): - print(f"FakeClient put_record_batch: {len(Records)} records") + def put_record_batch(self, **kwargs): + num_records = len(kwargs.get("Records", [])) + logging.debug(f"FakeClient put_record_batch: {num_records} records") return {"FailedPutCount": 0} class DeliveryStream: - delivery_stream_name = None client = None