From d40d783ea6f40064b9c2eefa013ee65b3475dc96 Mon Sep 17 00:00:00 2001 From: Lucas <116588+hairmare@users.noreply.github.com> Date: Tue, 31 Dec 2024 14:42:21 +0100 Subject: [PATCH] fix: Convert list from consumer to dict for message (#235) --- acringest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acringest.py b/acringest.py index 5ce04d0..486e4d1 100644 --- a/acringest.py +++ b/acringest.py @@ -172,11 +172,12 @@ def on_sigint(*_: Any) -> NoReturn: # noqa: ANN401 # pragma: no cover mc.make_bucket(bucket) for msg in consumer: + headers: list[tuple[str, bytes]] = msg.headers if msg.headers else [] ce: CloudEvent = from_structured( message=KafkaMessage( key=msg.key, value=msg.value, - headers=msg.headers if msg.headers else {}, + headers={h[0]: h[1] for h in headers}, ), ) if (