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

Aline Manera alinefm at linux.vnet.ibm.com
Fri Aug 29 19:52:31 UTC 2014


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'))
-- 
1.9.3




More information about the Kimchi-devel mailing list