[Kimchi-devel] [PATCH 4/9] Encode vm_name to generate VNC token

Ramon Medeiros ramonn at linux.vnet.ibm.com
Thu May 7 17:40:34 UTC 2015


Library base64 does not support unicode format. So, the conversion to
utf-8 will be forced before.

Signed-off-by: Ramon Medeiros <ramonn 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 3445def..97c011d 100644
--- a/src/kimchi/model/vms.py
+++ b/src/kimchi/model/vms.py
@@ -1077,7 +1077,7 @@ class VMModel(object):
         # (type, listen, port, passwd, passwdValidTo)
         graphics_port = self._vm_get_graphics(name)[2]
         if graphics_port is not None:
-            vnc.add_proxy_token(name, graphics_port)
+            vnc.add_proxy_token(name.encode("utf-8"), graphics_port)
         else:
             raise OperationFailed("KCHVM0010E", {'name': name})
 
-- 
2.1.0




More information about the Kimchi-devel mailing list