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
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 @@
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):