X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=userdir_ldap.py;h=babfce0dea6c1b23425f60348bb3352ced63d8e0;hb=86ec087cfca50de14630d1677d6d62d38763f619;hp=447723254b83a52ee2c7ccab2f4329b5c9162a02;hpb=9800f02fe77bb5025d71cc7c9fe29b425e681f28;p=mirror%2Fuserdir-ldap.git diff --git a/userdir_ldap.py b/userdir_ldap.py index 4477232..babfce0 100644 --- a/userdir_ldap.py +++ b/userdir_ldap.py @@ -43,6 +43,7 @@ TemplatesDir = ConfModule.templatesdir; PassDir = ConfModule.passdir; Ech_ErrorLog = ConfModule.ech_errorlog; Ech_MainLog = ConfModule.ech_mainlog; +HostDomain = getattr(ConfModule, "hostdomain", EmailAppend) try: UseSSL = ConfModule.usessl; @@ -320,7 +321,7 @@ def FormatPGPKey(Str): if (len(Str) == 32): I = 0; while (I < len(Str)): - if I+2 == 32/2: + if I == 32/2: Res = "%s %s%s "%(Res,Str[I],Str[I+1]); else: Res = "%s%s%s "%(Res,Str[I],Str[I+1]); @@ -329,7 +330,7 @@ def FormatPGPKey(Str): # OpenPGP Print I = 0; while (I < len(Str)): - if I+4 == 40/2: + if I == 40/2: Res = "%s %s%s%s%s "%(Res,Str[I],Str[I+1],Str[I+2],Str[I+3]); else: Res = "%s%s%s%s%s "%(Res,Str[I],Str[I+1],Str[I+2],Str[I+3]);