Skip to content

Commit

Permalink
Merge pull request #820 from Aiven-Open/aiven-anton/fix-move-list-ins…
Browse files Browse the repository at this point in the history
…tantiation

refactor: Move list instantiation to where it is used
  • Loading branch information
jjaakola-aiven authored Feb 22, 2024
2 parents 119fd58 + 9ece70d commit d9757f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion karapace/kafka_rest_apis/consumer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ async def fetch(self, internal_name: Tuple[str, str], content_type: str, formats
continue
if val <= 0:
KarapaceBase.internal_error(message=f"Invalid request parameter {val}", content_type=content_type)
response = []
LOG.info(
"Will poll multiple times for a single message with a total timeout of %dms, "
"until at least %d bytes have been fetched",
Expand Down Expand Up @@ -535,6 +534,7 @@ async def fetch(self, internal_name: Tuple[str, str], content_type: str, formats
read_bytes,
time.monotonic() - start_time,
)
response = []
for msg in poll_data:
try:
key = await self.deserialize(msg.key(), request_format) if msg.key() else None
Expand Down

0 comments on commit d9757f5

Please sign in to comment.