summaryrefslogtreecommitdiffstats
path: root/python.d
diff options
context:
space:
mode:
authorlgz <lgz@loled2>2016-12-24 14:30:50 +0900
committerlgz <lgz@loled2>2016-12-24 14:30:50 +0900
commit9c44ab27d48b1acf216f13d1c1f631636eee74f0 (patch)
tree14cc2f4703306b81c43416ddbbf5513263d72eb9 /python.d
parente89c23287f64ac53177fc3f26e3beaea8c407044 (diff)
rename function
Diffstat (limited to 'python.d')
-rw-r--r--python.d/isc_dhcpd.chart.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python.d/isc_dhcpd.chart.py b/python.d/isc_dhcpd.chart.py
index 959576d078..e76cd8a1c8 100644
--- a/python.d/isc_dhcpd.chart.py
+++ b/python.d/isc_dhcpd.chart.py
@@ -112,7 +112,7 @@ class Service(SimpleService):
all_leases = {k[6:len(k)-3]:v[7:len(v)-2] for k, v in raw_leases[0].items()}
# Result: [active binding, active binding....]. (Expire time (ends date;) - current time > 0)
- active_leases = [k for k, v in all_leases.items() if is_bind_active(all_leases[k])]
+ active_leases = [k for k, v in all_leases.items() if is_binding_active(all_leases[k])]
# Result: {pool: number of active bindings in pool, ...}
pools_count = {pool: len([lease for lease in active_leases if is_address_in(lease, pool)])
@@ -138,7 +138,7 @@ class Service(SimpleService):
return to_netdata
-def is_bind_active(binding):
+def is_binding_active(binding):
return mktime(strptime(binding, '%w %Y/%m/%d %H:%M:%S')) - mktime(gmtime()) > 0