if server is None:
global LDAPServer
server = LDAPServer
- lc = ldap.open(server)
+ lc = ldap.initialize('ldap://%s' % server)
global UseSSL
if UseSSL:
lc.start_tls_s()
Salt = Salt + SaltVals[ord(Rand.read(1)[0]) % len(SaltVals)]
Pass = crypt.crypt(Password, Salt)
if len(Pass) < 14:
- raise "Password Error", "MD5 password hashing failed, not changing the password!"
+ raise Exception("MD5 password hashing failed, not changing the password!")
return Pass