"isc_dhcpd" module update
lgz committed
Oct 13, 2017 at 20:40 UTC
c6b963ec7c4fc4a98d5c863e2ec7275960fdb715
1 file changed
+5
-5
python.d/isc_dhcpd.chart.py
+5
-5
@@ -7,14 +7,15 @@ from os import stat, access, R_OK
7
from os.path import isfile
8
try:
9
from ipaddress import ip_network, ip_address
10
- have_ipaddress = True
10
+ HAVE_IPADDRESS = True
11
except ImportError:
12
- have_ipaddress = False
12
+ HAVE_IPADDRESS = False
13
try:
14
from itertools import filterfalse
15
except ImportError:
16
from itertools import ifilterfalse as filterfalse
17
-from base import SimpleService
17
+
18
+from bases.FrameworkServices.SimpleService import SimpleService
19
20
priority = 60000
21
retries = 60
@@ -59,7 +60,7 @@ class Service(SimpleService):
60
# Also only ipv4 supported
61
62
def check(self):
62
- if not have_ipaddress:
63
+ if not HAVE_IPADDRESS:
64
self.error('\'python-ipaddress\' module is needed')
65
return False
66
if not (isfile(self.leases_path) and access(self.leases_path, R_OK)):
@@ -155,4 +156,3 @@ def find_lease(value):
156
157
def find_ends(value):
158
return value[2:6] != 'ends'
158
-