Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kafka/producer/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ def _wait_on_metadata(self, topic, max_wait_ms):
"""
# add topic to metadata topic list if it is not there already.
self._sender.add_topic(topic)
timer = Timer(max_wait_ms, "Failed to update metadata after %.1f secs." % (max_wait_ms * 1000,))
timer = Timer(max_wait_ms, "Failed to update metadata after %.1f secs." % (max_wait_ms / 1000,))
metadata_event = None
while True:
partitions = self._metadata.partitions_for_topic(topic)
Expand All @@ -962,7 +962,7 @@ def _wait_on_metadata(self, topic, max_wait_ms):
metadata_event.wait(timer.timeout_ms / 1000)
if not metadata_event.is_set():
raise Errors.KafkaTimeoutError(
"Failed to update metadata after %.1f secs." % (max_wait_ms * 1000,))
"Failed to update metadata after %.1f secs." % (max_wait_ms / 1000,))
elif topic in self._metadata.unauthorized_topics:
raise Errors.TopicAuthorizationFailedError(set([topic]))
else:
Expand Down
Loading