Avoid python 3.6 error.

subprocess doesn't have capture_output.
Use subprocess.PIPE instead.
This commit is contained in:
sliptonic
2022-07-02 12:03:11 -05:00
parent 38e4182440
commit 6bc60776f6

View File

@@ -85,10 +85,12 @@ def Startup():
import camotics
r = subprocess.run(
["camotics", "--version"], capture_output=True, text=True
["camotics", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
).stderr.strip()
v = parse(r)
v = parse(r.decode("utf-8"))
if v >= Version("1.2.2"):
from PathScripts import PathCamoticsGui
except (FileNotFoundError, ModuleNotFoundError):