[Kimchi-devel] [PATCH] bug fix: Properly get the graphics expiration time

Daniel H Barboza danielhb at linux.vnet.ibm.com
Mon Sep 1 12:29:28 UTC 2014


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

On 08/29/2014 04:52 PM, Aline Manera wrote:
> The data structure to graphics is:
> {
>    graphics: {'passwd': '12345', 'passwdValidTo': 30}
> }
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
>   src/kimchi/model/vms.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/kimchi/model/vms.py b/src/kimchi/model/vms.py
> index fb4cf22..8045b1e 100644
> --- a/src/kimchi/model/vms.py
> +++ b/src/kimchi/model/vms.py
> @@ -321,7 +321,7 @@ class VMModel(object):
>           if password is not None:
>               graphics.attrib['passwd'] = password
>
> -        expire = params.get("passwdValidTo")
> +        expire = params['graphics'].get("passwdValidTo")
>           to = graphics.attrib.get('passwdValidTo')
>           if to is not None:
>               if (time.mktime(time.strptime(to, '%Y-%m-%dT%H:%M:%S'))




More information about the Kimchi-devel mailing list