From 849895f9f94b70d55f3b69db07f23ba93468bca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Thu, 2 Aug 2012 20:10:03 -0300 Subject: Change ipcalc to ipaddr --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core.py') diff --git a/core.py b/core.py index a68d1e5..1ac7e4f 100644 --- a/core.py +++ b/core.py @@ -1,5 +1,5 @@ import socketserver -import ipcalc +import ipaddr class Daemon(): def __init__(data): @@ -26,7 +26,7 @@ class Daemon(): # Iterate over all IP block elements for network in self.data.get_networks(): for block in network.ip_blocks: - if ip in ipcalc.Network(block): + if ipaddr.IPAddress(ip) in ipaddr.IPNetwork(block): result['name'] = network.name for key in network.data: result[key] = network.data[key] -- cgit v1.2.3