diff options
author | LyleCheatham <hello@lylecheatham.com> | 2019-03-21 17:55:15 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-05-20 16:49:42 -0400 |
commit | 1235972b773080bb88e7ffa2901a7dad856abab0 (patch) | |
tree | c9078982845191b005f538408d83160dd3829a03 /klippy/util.py | |
parent | f7cb0875f44c9533a7eb546e4a2d3734730cb7ff (diff) | |
download | kutter-1235972b773080bb88e7ffa2901a7dad856abab0.tar.gz kutter-1235972b773080bb88e7ffa2901a7dad856abab0.tar.xz kutter-1235972b773080bb88e7ffa2901a7dad856abab0.zip |
util: Ignore errors in clear_hupcl (allows OSX to run)
Signed-off-by: Lyle Cheatham <hello@lylecheatham.com>
Diffstat (limited to 'klippy/util.py')
-rw-r--r-- | klippy/util.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |