X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=cd6b5177c513ea2b9093ebc6eeea5b3df62f2eea;hb=afe66549b3d3bbebeccf573a1d61f01c61e176d2;hp=d4e3f1d533e6b4ca16ddd3e95a83475d2ed83b87;hpb=c27eb9f519df17bb1dec7e20f1c31864559357be;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index d4e3f1d..cd6b517 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -192,7 +192,8 @@ def DoArbChange(Str, Attrs): if attrName not in ArbChanges: return None - if re.match(ArbChanges[attrName], G[1]) is None: + value = G[1] + if re.match(ArbChanges[attrName], value) is None: raise UDFormatError("Item does not match the required format" + ArbChanges[attrName]) Attrs.append((ldap.MOD_REPLACE, attrName, value)) @@ -432,7 +433,7 @@ def DoDNS(Str, Attrs, DnRecord): if p == "": if seenEmptypart: return "Invalid IPv6 address (%s): more than one :: (nothing in between colons) is not allowed" % (ipv6address) - seenEmptypart = True + seenEmptypart = True sanitized = "%s IN AAAA %s" % (hostname, ipv6address) else: raise UDFormatError("None of the types I recognize was it. I shouldn't be here. confused.")