Don't iterate on data if data is None

This commit is contained in:
Fabio Manganiello 2020-02-26 11:33:50 +01:00
parent 6e93c03438
commit 5504048c22

View file

@ -100,7 +100,7 @@ class SensorBackend(Backend):
reload = True
time.sleep(5)
if self.enabled_sensors:
if self.enabled_sensors and data is not None:
data = {
sensor: data[sensor]
for sensor, enabled in self.enabled_sensors.items()