serialcli: move RTS/CTS fix to open instead of reconfigure
diff --git a/serial/serialcli.py b/serial/serialcli.py
index 4e8b767..3070948 100644
--- a/serial/serialcli.py
+++ b/serial/serialcli.py
@@ -45,6 +45,12 @@
self._port_handle = None
raise SerialException("could not open port %s: %s" % (self.portstr, msg))
+ # if RTS and/or DTR are not set before open, they default to True
+ if self._rts_state is None:
+ self._rts_state = True
+ if self._dtr_state is None:
+ self._dtr_state = True
+
self._reconfigurePort()
self._port_handle.Open()
self.is_open = True
@@ -59,12 +65,6 @@
if not self._port_handle:
raise SerialException("Can only operate on a valid port handle")
- # if RTS and/or DTR are not set before open, they default to True
- if self._rts_state is None:
- self._rts_state = True
- if self._dtr_state is None:
- self._dtr_state = True
-
#~ self._port_handle.ReceivedBytesThreshold = 1
if self._timeout is None: