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

Aline Manera alinefm at linux.vnet.ibm.com
Mon May 4 18:58:55 UTC 2015


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 28/04/2015 10:16, Ramon Medeiros wrote:
> 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 87d63c1..f4034d9 100644
> --- a/src/kimchi/model/vms.py
> +++ b/src/kimchi/model/vms.py
> @@ -1050,7 +1050,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})
>




More information about the Kimchi-devel mailing list