Do not show unexpected error in ipa-ldap-updater

Prevent showing of unfriendly "Unexpected error" message, when providing
incorrect DM password to ipa-ldap-updater.

https://fedorahosted.org/freeipa/ticket/3825
This commit is contained in:
Ana Krivokapic 2013-09-03 12:42:48 +02:00 committed by Petr Viktorin
parent 5157fd450f
commit 15cc9740c0

View File

@ -673,6 +673,8 @@ def handle_error(error, log_file_name=None):
if isinstance(error, socket.error):
return error, 1
if isinstance(error, errors.ACIError):
return error.message, 1
if isinstance(error, ldap.INVALID_CREDENTIALS):
return "Invalid password", 1
if isinstance(error, ldap.INSUFFICIENT_ACCESS):