From 64a1d9f0ec1f7278b33ae16461fcb5d62978dc31 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sat, 15 Mar 2014 22:44:41 +0100 Subject: [PATCH] [attributs] exemp est de type netaddr.IPNetwork --- attributs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/attributs.py b/attributs.py index 04d8155..5a6d8b8 100644 --- a/attributs.py +++ b/attributs.py @@ -1006,6 +1006,14 @@ class portUDPin(portAttr): class exempt(Attr): legend = u"Exemption vers une IP" ldap_name = "exempt" + python_type = netaddr.IPNetwork + + def parse_value(self, net): + self.value = self.python_type(net) + + def __unicode__(self): + return unicode(self.value) + @crans_attribute class nombrePrises(intAttr):