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

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Fri Aug 29 21:45:02 UTC 2014


-- 
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On Fri, 2014-08-29 at 16:52 -0300, 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