diff options
author | Benn Roth <TheAtomicOption@users.noreply.github.com> | 2017-12-06 08:31:24 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2017-12-06 08:31:24 -0800 |
commit | 5d1b13ef2812ddfe619495178f41e57b1fb640df (patch) | |
tree | e533c64266b122f558c110901226d7020cf75e47 /kafka/conn.py | |
parent | 141b6b29609f9594ad9d3d3302a0123d1b831261 (diff) | |
download | kafka-python-5d1b13ef2812ddfe619495178f41e57b1fb640df.tar.gz |
changed for to use enumerate() (#1301)
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 51a007c..2d6e5ce 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -747,13 +747,12 @@ class BrokerConnection(object): return () # augment respones w/ correlation_id, future, and timestamp - for i in range(len(responses)): + for i, response in enumerate(responses): (correlation_id, future, timestamp) = self.in_flight_requests.popleft() latency_ms = (time.time() - timestamp) * 1000 if self._sensors: self._sensors.request_time.record(latency_ms) - response = responses[i] log.debug('%s Response %d (%s ms): %s', self, correlation_id, latency_ms, response) responses[i] = (response, future) |