From: <ve...@us...> - 2007-07-04 17:37:59
|
Revision: 725 http://luma.svn.sourceforge.net/luma/?rev=725&view=rev Author: vegarwe Date: 2007-07-04 10:37:56 -0700 (Wed, 04 Jul 2007) Log Message: ----------- Make Invalid credentials if a little more robust. Fix indentation Modified Paths: -------------- trunk/luma/lib/luma/base/backend/LumaConnection.py Modified: trunk/luma/lib/luma/base/backend/LumaConnection.py =================================================================== --- trunk/luma/lib/luma/base/backend/LumaConnection.py 2007-07-04 17:29:30 UTC (rev 724) +++ trunk/luma/lib/luma/base/backend/LumaConnection.py 2007-07-04 17:37:56 UTC (rev 725) @@ -276,10 +276,10 @@ message += str(workerThread.exceptionObject) environment.logMessage(LogObject("Error", message)) # Unset password in passwordMap and bindPassword on 'Invalid credentials' - if workerThread.exceptionObject.args[0]['desc'] == 'Invalid credentials': - if LumaConnection._passwordMap.has_key(self.serverMeta.name): - LumaConnection._passwordMap.pop(self.serverMeta.name) - self.serverMeta.bindPassword = "" + if isinstance(exceptionObject, ldap.INVALID_CREDENTIALS): + if LumaConnection._passwordMap.has_key(self.serverMeta.name): + LumaConnection._passwordMap.pop(self.serverMeta.name) + self.serverMeta.bindPassword = "" return (False, workerThread.exceptionObject) ############################################################################### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |