From f39ff7f0959983ddd650cedf143db5b281f4717c Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Thu, 11 Jun 2020 16:11:12 +0200 Subject: [PATCH] M #-: fallback to python3 (#3) --- src/sunstone/OpenNebulaVNC.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sunstone/OpenNebulaVNC.rb b/src/sunstone/OpenNebulaVNC.rb index c85d878003..1e2931ac80 100644 --- a/src/sunstone/OpenNebulaVNC.rb +++ b/src/sunstone/OpenNebulaVNC.rb @@ -152,7 +152,10 @@ class OpenNebulaVNC proxy_options << " -6" end - cmd ="python #{@proxy_path} #{proxy_options} #{@proxy_port}" + python = 'python3' if system("python3 -c True") + python = 'python' if system("python -c True") + + cmd ="#{python} #{@proxy_path} #{proxy_options} #{@proxy_port}" begin @logger.info { "Starting VNC proxy: #{cmd}" }