diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-05-07 23:35:54 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-05-07 23:35:54 +0200 |
commit | f7534c8198d787cd11a943fd720d0edb8497f8d3 (patch) | |
tree | da78c7fadf1b38f2cf18dc4079191ac6fab21b4a /serial/serialposix.py | |
parent | 19688bf72d963cd74e7f9ce846c804eafd3ba181 (diff) | |
download | pyserial-git-f7534c8198d787cd11a943fd720d0edb8497f8d3.tar.gz |
revert "fixes for RTS/DTR handling on open", bad solution
- with the patch, control lines have wrong initial state on posix
- makes no difference on win32, execpt add code
Diffstat (limited to 'serial/serialposix.py')
-rw-r--r-- | serial/serialposix.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py index f5fc43a..67a3fd4 100644 --- a/serial/serialposix.py +++ b/serial/serialposix.py @@ -551,19 +551,17 @@ class Serial(SerialBase, PlatformSpecific): def _update_rts_state(self): """Set terminal status line: Request To Send""" - if self._rts_state is not None: - if self._rts_state: - fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str) - else: - fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str) + if self._rts_state: + fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str) + else: + fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str) def _update_dtr_state(self): """Set terminal status line: Data Terminal Ready""" - if self._dtr_state is not None: - if self._dtr_state: - fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) - else: - fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str) + if self._dtr_state: + fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) + else: + fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str) @property def cts(self): |