[Kimchi-devel] [PATCH] issue #330: Properly log the error message when login fails

Daniel H Barboza danielhb at linux.vnet.ibm.com
Tue Mar 4 20:18:28 UTC 2014


Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>


On 03/04/2014 04:35 PM, Aline Manera wrote:
> From: Aline Manera <alinefm at br.ibm.com>
>
> The error message and all its parameters must be string.
> So convert error code to string in order to accomplish it.
>
> Signed-off-by: Aline Manera <alinefm at br.ibm.com>
> ---
>   src/kimchi/auth.py |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/kimchi/auth.py b/src/kimchi/auth.py
> index af3b610..b16f2db 100644
> --- a/src/kimchi/auth.py
> +++ b/src/kimchi/auth.py
> @@ -107,7 +107,7 @@ def authenticate(username, password, service="passwd"):
>       try:
>           auth.authenticate()
>       except PAM.error, (resp, code):
> -        msg_args = {'userid': username, 'code': code}
> +        msg_args = {'userid': username, 'code': str(code)}
>           raise OperationFailed("KCHAUTH0001E", msg_args)
>
>       return True




More information about the Kimchi-devel mailing list