Skip to content

Commit 4474a50

Browse files
committed
Async producer: py2.6 backward compatibility fix
1 parent a3fb322 commit 4474a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kafka/producer/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def _send_upstream(queue, client, codec, batch_time, batch_size,
126126
if error_type in RETRY_REFRESH_ERROR_TYPES:
127127
client.load_metadata_for_topics()
128128

129-
reqs = {key: count + 1 for key, count in reqs.items()
130-
if key in reqs_to_retry and count < retry_options.limit}
129+
reqs = dict((key, count + 1) for (key, count) in reqs.items()
130+
if key in reqs_to_retry and count < retry_options.limit)
131131

132132

133133
class Producer(object):

0 commit comments

Comments
 (0)