Skip to content

Commit 1bdf771

Browse files
committed
Switch from izip to zip
1 parent f0fadc5 commit 1bdf771

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/collectors/nvidia_gpu/nvidia_gpu.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* nvidia-ml-py (Optional)
1212
"""
1313

14-
from itertools import izip
1514
try:
1615
import pynvml
1716
USE_PYTHON_BINDING = True
@@ -71,7 +70,7 @@ def collect_via_nvidia_smi(self, stats_config):
7170
stats = result.strip().split(',')
7271
assert len(stats) == len(stats_config)
7372
index = stats[0]
74-
for stat_name, metric in izip(stats_config[1:], stats[1:]):
73+
for stat_name, metric in zip(stats_config[1:], stats[1:]):
7574
metric_name = 'gpu_{index}.{stat_name}'.format(
7675
index=str(index),
7776
stat_name=stat_name

src/collectors/sidekiq/sidekiq.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* redis
99
1010
"""
11-
from itertools import izip
12-
1311
try:
1412
import redis
1513
from redis.sentinel import Sentinel
@@ -89,7 +87,7 @@ def get_redis_client(self):
8987
else:
9088
sentinel_ports = [None for _ in xrange(len(ports))]
9189

92-
for port, sentinel_port in izip(ports, sentinel_ports):
90+
for port, sentinel_port in zip(ports, sentinel_ports):
9391
for db in xrange(0, int(databases)):
9492
master = self.get_master(
9593
host, port, sentinel_port, sentinel_name

0 commit comments

Comments
 (0)