X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-emailmatcher;h=aa717d5cdf0b5813bd6115eb135aea07a3429daa;hb=fe67fab54bca15f4820e4f0a911023ed10a743b7;hp=bae8fd9d6feeb1dcc3bb830cb1257d454a769957;hpb=cdba05cbc8f2fa6a8557fd43e6c4e4d5d8e1130c;p=mirror%2Fuserdir-ldap.git diff --git a/ud-emailmatcher b/ud-emailmatcher index bae8fd9..aa717d5 100755 --- a/ud-emailmatcher +++ b/ud-emailmatcher @@ -52,8 +52,7 @@ for x in arguments: Args = Args + GPGSearchOptions + [" 2> /dev/null"] Keys = os.popen(" ".join(Args),"r") -l = ldap.open(LDAPServer); -l.simple_bind_s("",""); +l = connectLDAP() # Fetch the key list and map to email address PasswdAttrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"keyfingerprint=*",\ @@ -85,7 +84,7 @@ while(1): if FingerPrint != None and UID != None: for x in Emails: Match = AddressSplit.match(x); - if Match == None: + if Match is None: continue; Groups = Match.groups(); Email = Groups[1]+'@'+Groups[2];