setup.py

branch
eric7
changeset 8966
c6f67dbc6ee7
parent 8918
2167e507b277
child 8977
663521af48b2
equal deleted inserted replaced
8965:741e81884088 8966:c6f67dbc6ee7
139 return 139 return
140 140
141 with contextlib.suppress(OSError): 141 with contextlib.suppress(OSError):
142 os.rename(fileName, fileName + ".orig") 142 os.rename(fileName, fileName + ".orig")
143 try: 143 try:
144 hgOut = subprocess.check_output(["hg", "identify", "-i"]) # secok 144 hgOut = subprocess.run( # secok
145 hgOut = hgOut.decode() 145 ["hg", "identify", "-i"], check=True,
146 capture_output=True, text=True
147 ).stdout
146 except (OSError, subprocess.CalledProcessError): 148 except (OSError, subprocess.CalledProcessError):
147 hgOut = "" 149 hgOut = ""
148 if hgOut: 150 if hgOut:
149 hgOut = hgOut.strip() 151 hgOut = hgOut.strip()
150 if hgOut.endswith("+"): 152 if hgOut.endswith("+"):

eric ide

mercurial