isc_dhcp: make sure lease has both "ends" and "state"
lgz committed
Feb 20, 2018 at 22:31 UTC
74b63ab742f57bb64cc80308ce28d543de1bab23
1 file changed
+1
-1
python.d/isc_dhcpd.chart.py
+1
-1
@@ -74,7 +74,7 @@ class DhcpdLeasesFile:
74
result[address]['ends'] = row[5:-1]
75
elif row.startswith('binding state'):
76
result[address]['state'] = row[14:-1]
77
- return result
77
+ return dict((k, v) for k, v in result.items() if len(v) == 2)
78
except (OSError, IOError):
79
return None
80