From 1235972b773080bb88e7ffa2901a7dad856abab0 Mon Sep 17 00:00:00 2001 From: LyleCheatham Date: Thu, 21 Mar 2019 17:55:15 -0400 Subject: [PATCH] util: Ignore errors in clear_hupcl (allows OSX to run) Signed-off-by: Lyle Cheatham --- klippy/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/klippy/util.py b/klippy/util.py index a5547830..948ac5ee 100644 --- a/klippy/util.py +++ b/klippy/util.py @@ -20,7 +20,10 @@ def set_nonblock(fd): def clear_hupcl(fd): attrs = termios.tcgetattr(fd) attrs[2] = attrs[2] & ~termios.HUPCL - termios.tcsetattr(fd, termios.TCSADRAIN, attrs) + try: + termios.tcsetattr(fd, termios.TCSADRAIN, attrs) + except termios.error: + pass # Support for creating a pseudo-tty for emulating a serial port def create_pty(ptyname):