]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Fork and exec using the current Python interpreter
authorVincent Bernat <vincent@bernat.ch>
Thu, 16 Jan 2020 10:48:59 +0000 (11:48 +0100)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Thu, 16 Jan 2020 11:12:56 +0000 (12:12 +0100)
When testing against various versions of Python by invoking autorandr
with an explicit Python interpreter, in batch mode, autorandr will
reexecute itself without specifying the Python interpreter. This
change makes sure it is reexecuted using the current Python
interpreter.

autorandr.py

index b781f4d77b5b91fa565eb14e3e22732c26baeaac..a6a9d2b6f02f0ee2a5123237fa35766a41d90653 100755 (executable)
@@ -1084,7 +1084,7 @@ def dispatch_call_to_sessions(argv):
             os.chdir(pwent.pw_dir)
             os.environ.clear()
             os.environ.update(process_environ)
-            os.execl(autorandr_binary, autorandr_binary, *argv[1:])
+            os.execl(sys.executable, sys.executable, autorandr_binary, *argv[1:])
             os.exit(1)
         os.waitpid(child_pid, 0)