setup.py

branch
eric7
changeset 8966
c6f67dbc6ee7
parent 8918
2167e507b277
child 8977
663521af48b2
diff -r 741e81884088 -r c6f67dbc6ee7 setup.py
--- a/setup.py	Mon Feb 28 17:10:59 2022 +0100
+++ b/setup.py	Mon Feb 28 19:44:36 2022 +0100
@@ -141,8 +141,10 @@
     with contextlib.suppress(OSError):
         os.rename(fileName, fileName + ".orig")
     try:
-        hgOut = subprocess.check_output(["hg", "identify", "-i"])       # secok
-        hgOut = hgOut.decode()
+        hgOut = subprocess.run(                     # secok
+            ["hg", "identify", "-i"], check=True,
+            capture_output=True, text=True
+        ).stdout
     except (OSError, subprocess.CalledProcessError):
         hgOut = ""
     if hgOut:

eric ide

mercurial