X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-mailgate;fp=ud-mailgate;h=32985d1c2c5f6a78714798e80a58395cd7b2f0c6;hp=02693b615a57c22829c58ae3954ee315897d3e9a;hb=1315e069f61f849e597587489bed21173ef812be;hpb=2d0e9a95ddac429690ce07cedfb23a1cfb2c8293 diff --git a/ud-mailgate b/ud-mailgate index 02693b6..32985d1 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -192,11 +192,10 @@ 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]) - value = G[1]; - Attrs.append((ldap.MOD_REPLACE, attrName, value)) return "Changed entry %s to %s" % (attrName, value)