]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Handle empty sys.executable
authorJulian Grinblat <julian@dotcore.co.il>
Tue, 23 Jun 2020 06:15:17 +0000 (15:15 +0900)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Fri, 26 Jun 2020 08:18:49 +0000 (10:18 +0200)
autorandr.py

index 824a7dbae0e52fca4deb79349c034e70e8ba1da1..6b39928ee7fbcbf62694eab30d2bd605dc123d34 100755 (executable)
@@ -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)