hddtemp: replace for loop with dict comp
lgz committed
Jun 18, 2018 at 21:26 UTC
5c49e65222b16035422182f59cd18a86496f4606
1 file changed
+1
-6
python.d/hddtemp.chart.py
+1
-6
@@ -75,12 +75,7 @@ class Service(SocketService):
75
if not disks:
76
return None
77
78
- data = dict()
79
-
80
- for d in disks:
81
- data[d.id] = d.temp
82
-
83
- return data
78
+ return dict((d.id, d.temp) for d in disks)
79
80
def check(self):
81
"""