summaryrefslogtreecommitdiff
path: root/core.py
diff options
context:
space:
mode:
authorRaúl Benencia <rbenencia@linti.unlp.edu.ar>2012-08-02 20:10:03 -0300
committerRaúl Benencia <rbenencia@linti.unlp.edu.ar>2012-08-02 20:10:03 -0300
commit849895f9f94b70d55f3b69db07f23ba93468bca4 (patch)
treeabf258d1fdf369d8ecba8fa22f2d375a0c070b59 /core.py
parent4d30bf280dbdb68ad72e01e911bf039b48ccb869 (diff)
Change ipcalc to ipaddr
Diffstat (limited to 'core.py')
-rw-r--r--core.py4
1 files changed, 2 insertions, 2 deletions
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]
nihil fit ex nihilo