summaryrefslogtreecommitdiff
path: root/serial/serialposix.py
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2015-08-04 15:44:14 +0200
committerChris Liechti <cliechti@gmx.net>2015-08-04 15:44:14 +0200
commit8cf8f068a354b4476461fd8790f463b6b7cd4ffe (patch)
treea54d8757019b84ae715da41d8e2b6b18c5e15bc4 /serial/serialposix.py
parent5c4d2d83c8f711b9704b4ee159207db61d45a93f (diff)
downloadpyserial-git-8cf8f068a354b4476461fd8790f463b6b7cd4ffe.tar.gz
posix: clear OCRNL/ONLCR flags (CR/LF translation settings)
Diffstat (limited to 'serial/serialposix.py')
-rw-r--r--serial/serialposix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 5542d28..41c4423 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -337,7 +337,7 @@ class Serial(SerialBase, io.RawIOBase):
if hasattr(TERMIOS, flag):
lflag &= ~getattr(TERMIOS, flag)
- oflag &= ~(TERMIOS.OPOST)
+ oflag &= ~(TERMIOS.OPOST|TERMIOS.ONLCR|TERMIOS.OCRNL)
iflag &= ~(TERMIOS.INLCR|TERMIOS.IGNCR|TERMIOS.ICRNL|TERMIOS.IGNBRK)
if hasattr(TERMIOS, 'IUCLC'):
iflag &= ~TERMIOS.IUCLC