Handle empty sys.executable

This commit is contained in:
Julian Grinblat 2020-06-23 15:15:17 +09:00 committed by Phillip Berndt
parent c84bf4811f
commit df568a1622

View File

@ -1107,7 +1107,10 @@ def dispatch_call_to_sessions(argv):
os.chdir(pwent.pw_dir)
os.environ.clear()
os.environ.update(process_environ)
os.execl(sys.executable, sys.executable, autorandr_binary, *argv[1:])
if sys.executable != "":
os.execl(sys.executable, sys.executable, autorandr_binary, *argv[1:])
else:
os.execl(autorandr_binary, autorandr_binary, *argv[1:])
os.exit(1)
os.waitpid(child_pid, 0)