1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-13 18:14:23 +02:00

Update converter.py

This commit is contained in:
Mitch Bradley
2023-02-01 19:27:22 -10:00
committed by GitHub
parent 4de130cdf9
commit e37a6ed2b7

View File

@@ -33,6 +33,11 @@ def convertMachine(baseName, verbose=True, extraArgs=None):
cmd = [ '.pio/build/' + pioEnv + '/program' ]
out_filename = "yaml/" + Path(baseName).stem + ".yaml"
proc = subprocess.run(cmd, env=env, stdout=open(out_filename, "w"), stderr=subprocess.STDOUT, bufsize=1)
if proc.returncode:
print('Converter failed with exit code', proc.returncode)
with open(out_filename, 'r') as f:
print(f.read())
else:
print("FluidNC Configuration written to", out_filename)
return proc.returncode
else: