scripts/install.py

branch
eric7
changeset 8522
4f263b89a293
parent 8501
7b5f10581c35
child 8548
c87eb20797b7
--- a/scripts/install.py	Fri Aug 20 14:11:49 2021 +0200
+++ b/scripts/install.py	Fri Aug 20 14:19:13 2021 +0200
@@ -1754,10 +1754,11 @@
     
     with contextlib.suppress(OSError):
         os.rename(fileName, fileName + ".orig")
-    if sys.platform.startswith(("win", "cygwin")):
-        localHg = os.path.join(sys.exec_prefix, "Scripts", "hg.exe")
-    else:
-        localHg = os.path.join(sys.exec_prefix, "bin", "hg")
+    localHg = (
+        os.path.join(sys.exec_prefix, "Scripts", "hg.exe")
+        if sys.platform.startswith(("win", "cygwin")) else
+        os.path.join(sys.exec_prefix, "bin", "hg")
+    )
     for hg in (localHg, "hg"):
         with contextlib.suppress(OSError, subprocess.CalledProcessError):
             hgOut = subprocess.check_output([hg, "identify", "-i"])   # secok

eric ide

mercurial