From 072eb642f0c7bc83602dce66ed5fde8ab27fa397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 23 Jun 2018 17:39:20 +0000 Subject: [PATCH] Minor fix --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 7bc7e55..46abdec 100644 --- a/main.py +++ b/main.py @@ -11,6 +11,8 @@ api_password = config.get('Re2o', 'password') api_username = config.get('Re2o', 'username') def regen_dhcp(api_client): + host_mac_ip = {} + for hmi in api_client.list_hostmacip(): if hmi['extension'] not in host_mac_ip.keys(): host_mac_ip[hmi['extension']] = [] @@ -35,7 +37,6 @@ def regen_dhcp(api_client): with open(filename, 'w+') as f: f.write(dhcp_leases_content) -host_mac_ip = {} api_client = Re2oAPIClient(api_hostname, api_username, api_password) client_hostname = socket.gethostname().split('.', 1)[0]