diff mercurial/chgserver.py @ 42523:49998d5ba66a

pycompat: make fewer assumptions about sys.executable There are many Python "bundlers" which create an archive to run a Python binary from, and they may not set sys.executable at all - handle that case properly, especially to run tests. Differential Revision: https://phab.mercurial-scm.org/D6575
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Tue, 25 Jun 2019 19:28:41 -0700
parents bce2356ece68
children 0cbe17335857
line wrap: on
line diff
--- a/mercurial/chgserver.py	Thu Jun 27 11:39:35 2019 +0200
+++ b/mercurial/chgserver.py	Tue Jun 25 19:28:41 2019 -0700
@@ -138,7 +138,9 @@
         modules.append(__version__)
     except ImportError:
         pass
-    files = [pycompat.sysexecutable]
+    files = []
+    if pycompat.sysexecutable:
+        files.append(pycompat.sysexecutable)
     for m in modules:
         try:
             files.append(pycompat.fsencode(inspect.getabsfile(m)))