message: [GUI] Robustified the python version check
diff: @@ -23,20 +23,38 @@ protocol.registerSchemesAsPrivileged([
  // function to get determine correct command for python
  function getPyCmd() {
  + // call both 'python' and 'python3' to figure out the correct command
  let spawnRet = spawnSync('python', ['-V']);
  - let vString;
  + let success = spawnRet.status != null;
  + let outputString;
  + if (success) {
  if (spawnRet.stdout.toString().length > 1) {
  - vString = spawnRet.stdout.toString();
  + outputString = spawnRet.stdout.toString();
  }
  else {
  - vString = spawnRet.stderr.toString();
  + outputString = spawnRet.stderr.toString();
  }
  -
  - if (vString.split(' ')[1].split('.')[0] == '2') {
  + if (outputString.includes("Python 3")) {
  + return 'python';
  + }
  + }
  + else {
  + spawnRet = spawnSync('python3', ['-V']);
  + success = spawnRet.status != null;
  + if (success) {
  + if (spawnRet.stdout.toString().length > 1) {
  + outputString = spawnRet.stdout.toString();
  + }
  + else {
  + outputString = spawnRet.stderr.toString();
  + }
  + if (outputString.includes("Python 3")) {
  return 'python3';
  }
  + }
  else {
  - return 'python';
  + return '';
  + }
  }
  }
  