Skip to content

Commit

Permalink
Async producer: py2.6 backward compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vshlapakov committed May 15, 2015
1 parent 4c65bfb commit 93ef46d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kafka/producer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def _send_upstream(queue, client, codec, batch_time, batch_size,
if error_type in RETRY_REFRESH_ERROR_TYPES:
client.load_metadata_for_topics()

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


class Producer(object):
Expand Down

0 comments on commit 93ef46d

Please sign in to comment.