Skip to content

Commit c972976

Browse files
committed
s/global_error/error_message/
1 parent cfbfe05 commit c972976

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kafka/producer/sender.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,15 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
410410
log_append_time = -1
411411
log_start_offset = -1
412412
record_errors = ()
413-
global_error = None
413+
error_message = None
414414
if response.API_VERSION < 2:
415415
partition, error_code, base_offset = partition_info
416416
elif 2 <= response.API_VERSION <= 4:
417417
partition, error_code, base_offset, log_append_time = partition_info
418418
elif 5 <= response.API_VERSION <= 7:
419419
partition, error_code, base_offset, log_append_time, log_start_offset = partition_info
420420
else:
421-
partition, error_code, base_offset, log_append_time, log_start_offset, record_errors, global_error = partition_info
421+
partition, error_code, base_offset, log_append_time, log_start_offset, record_errors, error_message = partition_info
422422
tp = TopicPartition(topic, partition)
423423
batch = batches_by_partition[tp]
424424
partition_response = PartitionResponse(
@@ -428,7 +428,7 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
428428
log_append_time=log_append_time,
429429
log_start_offset=log_start_offset,
430430
record_errors=record_errors,
431-
error_message=global_error,
431+
error_message=error_message,
432432
)
433433
self._complete_batch(batch, partition_response)
434434
else:

0 commit comments

Comments
 (0)