From dead142bb5b5d62800cc8ff23aeab52bdfca3814 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 31 Dec 2024 14:34:21 +0100 Subject: [PATCH] fix: Convert list from consumer to dict for message --- 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 (