From 979accb43f09534e36516b4951f1935917a271ec Mon Sep 17 00:00:00 2001 From: Charlie Jacomme Date: Wed, 27 Jun 2018 19:11:05 +0200 Subject: [PATCH] stupid charlie, stupid --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 78e5f5c..1b71287 100755 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ api_username = config.get('Re2o', 'username') def regen_dhcp(api_client): host_mac_ip = {} - for hmi in api_client.view("dhcp/hostmacip/")['results']: + for hmi in api_client.list("dhcp/hostmacip/"): if hmi['extension'] not in host_mac_ip.keys(): host_mac_ip[hmi['extension']] = [] host_mac_ip[hmi['extension']].append((hmi['hostname'], @@ -42,7 +42,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password) client_hostname = socket.gethostname().split('.', 1)[0] -for service in api_client.view("services/regen")['results']: +for service in api_client.list("services/regen"): #if service['hostname'] == client_hostname and \ # service['service_name'] == 'dhcp' and \ # service['need_regen']: