another tty fix

This commit is contained in:
Mario Voigt 2022-12-03 20:42:17 +01:00
parent b8c94cbc27
commit 374769a3e0

View File

@ -1408,11 +1408,7 @@ module chamfer_sphere(rad=chamfer, res=chamfer_fn)
pass pass
if not running: if not running:
try: try:
tty = open("/dev/tty", "w") with subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as proc:
except Exception:
tty = subprocess.PIPE
try:
with subprocess.Popen(cmd, shell=True, stdin=tty, stdout=tty, stderr=tty) as proc:
proc.wait() proc.wait()
except OSError as e: except OSError as e:
raise OSError("%s failed: errno=%d %s" % (cmd, e.errno, e.strerror)) raise OSError("%s failed: errno=%d %s" % (cmd, e.errno, e.strerror))