noVNC is smart about python2

This commit is contained in:
Jaime Melis committed 2016-05-18 18:28:52 +02:00
1 parent d9d5811b7d
commit bd9f9f6d42
1 file changed
+4 -1
+4 -1
View File
@@ -148,7 +148,10 @@ class OpenNebulaVNC
proxy_options << " -6"
end
cmd ="python #{@proxy_path} #{proxy_options} #{@proxy_port}"
system("which python2 >/dev/null 2>&1")
python = $?.success? ? "python2" : "python"
cmd ="#{python} #{@proxy_path} #{proxy_options} #{@proxy_port}"
begin
@logger.info { "Starting VNC proxy: #{cmd}" }