diff options
author | Raúl Benencia <rbenencia@linti.unlp.edu.ar> | 2012-08-02 20:10:03 -0300 |
---|---|---|
committer | Raúl Benencia <rbenencia@linti.unlp.edu.ar> | 2012-08-02 20:10:03 -0300 |
commit | 849895f9f94b70d55f3b69db07f23ba93468bca4 (patch) | |
tree | abf258d1fdf369d8ecba8fa22f2d375a0c070b59 /core.py | |
parent | 4d30bf280dbdb68ad72e01e911bf039b48ccb869 (diff) |
Change ipcalc to ipaddr
Diffstat (limited to 'core.py')
-rw-r--r-- | core.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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] |